Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
truenas-rk3588
k3s
Commits
dd3f3dba
Commit
dd3f3dba
authored
2 years ago
by
Manuel Buil
Browse files
Options
Download
Email Patches
Plain Diff
Fix dualStack test
Signed-off-by:
Manuel Buil
<
mbuil@suse.com
>
parent
06d81cb9
base
backup-26-10-22
master
rel-v0.0.1
release/22.12
release/22.12-RC.1
release/22.12.1
release/22.12.2
release/22.12.3
release/22.12.4
release/23.10-BETA.1
release/23.10-RC.1
release/23.10.0
release/23.10.1
release/23.10.1.2
release/23.10.1.3
release/23.10.2
release/24.04-BETA.1
release/24.04-RC.1
release/24.04.0
remove-traefik-k3s
stable/bluefin
stable/cobia
stable/dragonfish
testing-refine-branchout-process
testing-refine-branchout-process2
truenas/master
truenas/master-backup-12-2-24
truenas/master-backup-17-2-24
truenas/master-backup-2-7-23
update-1.27
update-1.28
update-1.29
TS-24.04-RC.1
TS-24.04-BETA.1
TS-23.10.2
TS-23.10.1.3
TS-23.10.1.2
TS-23.10.1.1
TS-23.10.1
TS-23.10.0.1
TS-23.10.0
TS-23.10-RC.1
TS-23.10-BETA.1
TS-22.12.4.2
TS-22.12.4.1
TS-22.12.4
TS-22.12.3.3
TS-22.12.3.2
TS-22.12.3.1
TS-22.12.3
TS-22.12.2
TS-22.12.1
TS-22.12.0
TS-22.12-RC.1
TS-12.12.3
DN110M-CS-v2.0
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/e2e/dualstack/Vagrantfile
+2
-1
tests/e2e/dualstack/Vagrantfile
tests/e2e/dualstack/dualstack_test.go
+2
-2
tests/e2e/dualstack/dualstack_test.go
tests/e2e/scripts/ipv6.sh
+4
-2
tests/e2e/scripts/ipv6.sh
with
8 additions
and
5 deletions
+8
-5
tests/e2e/dualstack/Vagrantfile
View file @
dd3f3dba
...
...
@@ -16,6 +16,7 @@ def provision(vm, roles, role_num, node_num)
vm
.
hostname
=
"
#{
roles
[
0
]
}
-
#{
role_num
}
"
node_ip4
=
"
#{
NETWORK4_PREFIX
}
.
#{
100
+
node_num
}
"
node_ip6
=
"
#{
NETWORK6_PREFIX
}
::
#{
10
+
node_num
}
"
node_ip6_gw
=
"
#{
NETWORK6_PREFIX
}
::1"
# Only works with libvirt, which allows IPv4 + IPv6 on a single network/interface
vm
.
network
"private_network"
,
:ip
=>
node_ip4
,
...
...
@@ -32,7 +33,7 @@ def provision(vm, roles, role_num, node_num)
defaultOSConfigure
(
vm
)
vm
.
provision
"IPv6 Setup"
,
type:
"shell"
,
path:
scripts_location
+
"/ipv6.sh"
,
args:
[
node_ip4
,
node_ip6
,
vm
.
box
.
to_s
]
vm
.
provision
"IPv6 Setup"
,
type:
"shell"
,
path:
scripts_location
+
"/ipv6.sh"
,
args:
[
node_ip4
,
node_ip6
,
node_ip6_gw
,
vm
.
box
.
to_s
]
install_type
=
getInstallType
(
vm
,
RELEASE_VERSION
,
GITHUB_BRANCH
)
vm
.
provision
"Ping Check"
,
type:
"shell"
,
inline:
"ping -c 2 k3s.io"
...
...
This diff is collapsed.
Click to expand it.
tests/e2e/dualstack/dualstack_test.go
View file @
dd3f3dba
...
...
@@ -117,7 +117,7 @@ var _ = Describe("Verify DualStack Configuration", Ordered, func() {
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
for
_
,
node
:=
range
nodeIPs
{
Expect
(
node
.
ipv4
)
.
Should
(
ContainSubstring
(
"10.10.10"
))
Expect
(
node
.
ipv6
)
.
Should
(
ContainSubstring
(
"
a
11:decf:c0ff"
))
Expect
(
node
.
ipv6
)
.
Should
(
ContainSubstring
(
"
fd
11:decf:c0ff"
))
}
})
It
(
"Verifies that each pod has IPv4 and IPv6"
,
func
()
{
...
...
@@ -125,7 +125,7 @@ var _ = Describe("Verify DualStack Configuration", Ordered, func() {
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
for
_
,
pod
:=
range
podIPs
{
Expect
(
pod
.
ipv4
)
.
Should
(
Or
(
ContainSubstring
(
"10.10.10"
),
ContainSubstring
(
"10.42."
)),
pod
.
name
)
Expect
(
pod
.
ipv6
)
.
Should
(
Or
(
ContainSubstring
(
"
a
11:decf:c0ff"
),
ContainSubstring
(
"2001:cafe:42"
)),
pod
.
name
)
Expect
(
pod
.
ipv6
)
.
Should
(
Or
(
ContainSubstring
(
"
fd
11:decf:c0ff"
),
ContainSubstring
(
"2001:cafe:42"
)),
pod
.
name
)
}
})
...
...
This diff is collapsed.
Click to expand it.
tests/e2e/scripts/ipv6.sh
View file @
dd3f3dba
#!/bin/bash
ip4_addr
=
$1
ip6_addr
=
$2
os
=
$3
ip6_addr_gw
=
$3
os
=
$4
sysctl
-w
net.ipv6.conf.all.disable_ipv6
=
0
sysctl
-w
net.ipv6.conf.eth1.accept_dad
=
0
...
...
@@ -19,4 +20,5 @@ elif [ -z "${os##*alpine*}" ]; then
else
ip
-6
addr add
"
$ip6_addr
"
/64 dev eth1
fi
ip addr show dev eth1
\ No newline at end of file
ip addr show dev eth1
ip
-6
r add default via
"
$ip6_addr_gw
"
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help