diff --git a/test/infrastructure/docker/internal/provisioning/cloudinit/runcmd.go b/test/infrastructure/docker/internal/provisioning/cloudinit/runcmd.go index c6e15aca0a0b..aa1345cae26d 100644 --- a/test/infrastructure/docker/internal/provisioning/cloudinit/runcmd.go +++ b/test/infrastructure/docker/internal/provisioning/cloudinit/runcmd.go @@ -56,7 +56,7 @@ func (a *runCmd) Commands() ([]provisioning.Cmd, error) { } // ignorePreflightErrors are preflight errors that fail in CAPD and thus we have to ignore them. -const ignorePreflightErrors = "SystemVerification,Swap,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables" +const ignorePreflightErrors = "SystemVerification,Swap,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables,FileContent--proc-sys-net-bridge-bridge-nf-call-ip6tables" func hackKubeadmIgnoreErrors(c provisioning.Cmd) provisioning.Cmd { // case kubeadm commands are defined as a string diff --git a/test/infrastructure/docker/internal/provisioning/cloudinit/runcmd_test.go b/test/infrastructure/docker/internal/provisioning/cloudinit/runcmd_test.go index 3050b9ec51d8..ccf76750c80e 100644 --- a/test/infrastructure/docker/internal/provisioning/cloudinit/runcmd_test.go +++ b/test/infrastructure/docker/internal/provisioning/cloudinit/runcmd_test.go @@ -71,7 +71,7 @@ func TestRunCmdRun(t *testing.T) { }, }, expectedCmds: []provisioning.Cmd{ - {Cmd: "/bin/sh", Args: []string{"-c", "kubeadm init --ignore-preflight-errors=SystemVerification,Swap,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables --config /run/kubeadm/kubeadm.yaml"}}, + {Cmd: "/bin/sh", Args: []string{"-c", "kubeadm init --ignore-preflight-errors=SystemVerification,Swap,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables,FileContent--proc-sys-net-bridge-bridge-nf-call-ip6tables --config /run/kubeadm/kubeadm.yaml"}}, }, }, } @@ -101,11 +101,11 @@ runcmd: r.Cmds[0] = hackKubeadmIgnoreErrors(r.Cmds[0]) - expected0 := provisioning.Cmd{Cmd: "/bin/sh", Args: []string{"-c", "kubeadm init --ignore-preflight-errors=SystemVerification,Swap,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables --config=/run/kubeadm/kubeadm.yaml"}} + expected0 := provisioning.Cmd{Cmd: "/bin/sh", Args: []string{"-c", "kubeadm init --ignore-preflight-errors=SystemVerification,Swap,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables,FileContent--proc-sys-net-bridge-bridge-nf-call-ip6tables --config=/run/kubeadm/kubeadm.yaml"}} g.Expect(r.Cmds[0]).To(Equal(expected0)) r.Cmds[1] = hackKubeadmIgnoreErrors(r.Cmds[1]) - expected1 := provisioning.Cmd{Cmd: "kubeadm", Args: []string{"join", "--ignore-preflight-errors=SystemVerification,Swap,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables", "--config=/run/kubeadm/kubeadm-controlplane-join-config.yaml"}} + expected1 := provisioning.Cmd{Cmd: "kubeadm", Args: []string{"join", "--ignore-preflight-errors=SystemVerification,Swap,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables,FileContent--proc-sys-net-bridge-bridge-nf-call-ip6tables", "--config=/run/kubeadm/kubeadm-controlplane-join-config.yaml"}} g.Expect(r.Cmds[1]).To(Equal(expected1)) }