Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IPv6] Support no-encap mode in dual-stack setup #2436

Merged
merged 1 commit into from
Aug 26, 2021

Conversation

lzhecheng
Copy link
Contributor

@lzhecheng lzhecheng commented Jul 20, 2021

* Extend single IP address to IPv4 and IPv6 ones for NodeAddr and NodeTransportAddr in nodeConfig
* Refactor occurrences of Node IP address to adjust to 2 IP: agent initialization, node route
* Still use one IP for IPv6/dual-stack not supported cases: Windows, NPL
* Update tests

Signed-off-by: Zhecheng Li [email protected]

Related: #2426

@codecov-commenter
Copy link

codecov-commenter commented Jul 20, 2021

Codecov Report

Merging #2436 (d51e919) into main (d785904) will increase coverage by 17.74%.
The diff coverage is 41.95%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2436       +/-   ##
===========================================
+ Coverage   42.51%   60.26%   +17.74%     
===========================================
  Files         148      283      +135     
  Lines       18247    22544     +4297     
===========================================
+ Hits         7758    13586     +5828     
+ Misses       9789     7514     -2275     
- Partials      700     1444      +744     
Flag Coverage Δ
kind-e2e-tests 47.23% <36.78%> (?)
unit-tests 41.90% <38.35%> (-0.61%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/agent/agent_linux.go 80.00% <ø> (+80.00%) ⬆️
.../controller/egress/ipassigner/ip_assigner_linux.go 0.00% <0.00%> (ø)
pkg/agent/route/route_linux.go 43.25% <18.18%> (ø)
pkg/agent/util/net.go 36.36% <25.00%> (+7.79%) ⬆️
...gent/controller/noderoute/node_route_controller.go 54.92% <43.07%> (+6.38%) ⬆️
pkg/util/k8s/node.go 65.00% <56.25%> (-19.62%) ⬇️
pkg/agent/memberlist/cluster.go 72.11% <60.00%> (-0.71%) ⬇️
pkg/agent/agent.go 50.93% <61.11%> (+30.84%) ⬆️
pkg/agent/openflow/client.go 57.99% <62.50%> (+32.57%) ⬆️
pkg/agent/config/node_config.go 100.00% <100.00%> (+100.00%) ⬆️
... and 243 more

@lzhecheng lzhecheng force-pushed the issue_2426 branch 2 times, most recently from 6754390 to 35a88dc Compare July 21, 2021 04:00
@lzhecheng lzhecheng force-pushed the issue_2426 branch 4 times, most recently from 4760ac3 to 5094e9d Compare August 2, 2021 10:03
@lzhecheng lzhecheng changed the title [WIP][IPv6] Support no-encap mode in dual-stack setup [IPv6] Support no-encap mode in dual-stack setup Aug 2, 2021
@lzhecheng lzhecheng requested review from wenyingd, tnqn, jianjuns and antoninbas and removed request for wenyingd and tnqn August 3, 2021 01:54
@lzhecheng
Copy link
Contributor Author

/test-all /test-ipv6-e2e /test-ipv6-only-e2e

Copy link
Contributor

@jianjuns jianjuns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a short description in the commit message on what are added or what were missing to support no-encap mode in dual stack?

@antoninbas
Copy link
Contributor

Could you add a short description in the commit message on what are added or what were missing to support no-encap mode in dual stack?

and link to the appropriate issue

Comment on lines 117 to 138
for _, ip := range localIPs {
if ipNet.IP.Equal(ip) {
iface = &linkList[i]
if ip.To4() == nil {
v6IPNet = ipNet
} else {
v4IPNet = ipNet
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible for the 2 different IPs for the Node (v4 / v6) to correspond to 2 different interfaces?

the function comment talks about "associated devices from IP", but we only return a single interface it seems

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed with Wenying, we think that maybe it is unnecessary to consider such case. In such case, user should consider have 2 clusters with such interfaces.

The comment is updated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the restriction makes sense. Especially in a scenario where we may need to move the uplink to the OVS bridge. However, do you think we can log a clean error in that case and fail agent initialization?

pkg/agent/route/route_linux.go Outdated Show resolved Hide resolved
@lzhecheng lzhecheng force-pushed the issue_2426 branch 3 times, most recently from 92118f6 to 34602a4 Compare August 5, 2021 02:59
@lzhecheng
Copy link
Contributor Author

/test-all /test-ipv6-all /test-ipv6-only-all

@lzhecheng lzhecheng added this to the Antrea v1.3 release milestone Aug 23, 2021
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two comments, otherwise LGTM

pkg/agent/controller/noderoute/node_route_controller.go Outdated Show resolved Hide resolved
if nodeAddrs.IPv4 == nil {
return "", fmt.Errorf("there is no IPv4 address from K8s Node")
}
member := fmt.Sprintf("%s:%d", nodeAddrs.IPv4, c.bindPort)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR can keep egress feature work in IPv6 cluster easily if it just handles the case like ipsec:

nodeAddr := nodeAddrs.IPv4
if nodeAddr == nil {
    nodeAddr = nodeAddrs.IPv6
}
member := fmt.Sprintf("%s:%d", nodeAddr, c.bindPort)

@lzhecheng
Copy link
Contributor Author

@tnqn for the comment in pkg/agent/memberlist/cluster.go, I think the member var is an address. As a result, if IPv6, format string should be [<ip>]:<port>. I changed it to:

	nodeAddr := nodeAddrs.IPv4
	fmtStr := "%s:%d"
	if nodeAddr == nil {
		nodeAddr = nodeAddrs.IPv6
		fmtStr = "[%s]:%d"
	}
	member := fmt.Sprintf(fmtStr, nodeAddr, c.bindPort)

Please correct me if wrong.

@tnqn
Copy link
Member

tnqn commented Aug 25, 2021

@tnqn for the comment in pkg/agent/memberlist/cluster.go, I think the member var is an address. As a result, if IPv6, format string should be [<ip>]:<port>. I changed it to:

	nodeAddr := nodeAddrs.IPv4
	fmtStr := "%s:%d"
	if nodeAddr == nil {
		nodeAddr = nodeAddrs.IPv6
		fmtStr = "[%s]:%d"
	}
	member := fmt.Sprintf(fmtStr, nodeAddr, c.bindPort)

Please correct me if wrong.

Thanks for bringing this issue. I think you are right, but I wonder how it worked when Wenqi tested it on IPv6. @wenqiq can you confirm whether "[]" is needed? Did you use dual-stack or pure IPv6 cluster when testing this?

@tnqn
Copy link
Member

tnqn commented Aug 25, 2021

Given the single IPv6 stack case may be not working before this PR, I won't block it because of this. @lzhecheng Please resolve the conflict then we can merge this.
@wenqiq will follow up the IPv6 case and ensure it can be covered by e2e test.

* Extend single IP address to IPv4 and IPv6 ones for NodeAddr and NodeTransportAddr in nodeConfig
* Refactor occurrences of Node IP address to adjust to 2 IP: agent initialization, node route
* Still use one IP for IPv6/dual-stack not supported cases: Windows, NPL
* Update tests

Signed-off-by: Zhecheng Li <[email protected]>

Related: antrea-io#2426
@wenqiq
Copy link
Contributor

wenqiq commented Aug 26, 2021

@tnqn for the comment in pkg/agent/memberlist/cluster.go, I think the member var is an address. As a result, if IPv6, format string should be [<ip>]:<port>. I changed it to:

	nodeAddr := nodeAddrs.IPv4
	fmtStr := "%s:%d"
	if nodeAddr == nil {
		nodeAddr = nodeAddrs.IPv6
		fmtStr = "[%s]:%d"
	}
	member := fmt.Sprintf(fmtStr, nodeAddr, c.bindPort)

Please correct me if wrong.

Thanks for bringing this issue. I think you are right, but I wonder how it worked when Wenqi tested it on IPv6. @wenqiq can you confirm whether "[]" is needed? Did you use dual-stack or pure IPv6 cluster when testing this?

@tnqn @lzhecheng I think you are right. It has been tested in pure IPv4 and dual-stack cluster but not pure IPv6 cluster.I'm still adding some test cases about IPv6.

I think just

nodeAddr := nodeAddrs.IPv4
if nodeAddr == nil {
    nodeAddr = nodeAddrs.IPv6
}

return nodeAddr.String(), nil

is OK. As the bindPort has been seted and port will added when joinning memberlist.

member is used for memberlist host join, I have checked the MemberList_ResolveAddr:

https://github.com/hashicorp/memberlist/blob/838073fef1a4e1f6cb702a57a8075304098b1c31/memberlist_test.go#L350

func TestMemberList_ResolveAddr(t *testing.T) {
	m := GetMemberlist(t, nil)
	defer m.Shutdown()

	defaultPort := uint16(m.config.BindPort)

	type testCase struct {
		name           string
		in             string
		expectErr      bool
		ignoreExpectIP bool
		expect         []ipPort
	}

	baseCases := []testCase{
		{
			name:           "localhost",
			in:             "localhost",
			ignoreExpectIP: true,
			expect: []ipPort{
				{port: defaultPort},
			},
		},
		{
			name: "ipv6 pair",
			in:   "[::1]:80",
			expect: []ipPort{
				{ip: net.IPv6loopback, port: 80},
			},
		},
		{
			name: "ipv6 non-pair",
			in:   "[::1]",
			expect: []ipPort{
				{ip: net.IPv6loopback, port: defaultPort},
			},
		},
		{
			name:      "hostless port",
			in:        ":80",
			expectErr: true,
		},
		{
			name:           "hostname port combo",
			in:             "localhost:80",
			ignoreExpectIP: true,
			expect: []ipPort{
				{port: 80},
			},
		},
		{
			name:      "too high port",
			in:        "localhost:80000",
			expectErr: true,
		},
		{
			name: "ipv4 port combo",
			in:   "127.0.0.1:80",
			expect: []ipPort{
				{ip: net.IPv4(127, 0, 0, 1), port: 80},
			},
		},
		{
			name: "ipv6 port combo",
			in:   "[2001:db8:a0b:12f0::1]:80",
			expect: []ipPort{
				{
					ip:   net.IP{0x20, 0x01, 0x0d, 0xb8, 0x0a, 0x0b, 0x12, 0xf0, 0, 0, 0, 0, 0, 0, 0, 0x1},
					port: 80,
				},
			},
		},
		{
			name:      "ipv4 port combo with empty tag",
			in:        "/127.0.0.1:80",
			expectErr: true,
		},
		{
			name: "ipv4 only",
			in:   "127.0.0.1",
			expect: []ipPort{
				{ip: net.IPv4(127, 0, 0, 1), port: defaultPort},
			},
		},
		{
			name: "ipv6 only",
			in:   "[2001:db8:a0b:12f0::1]",
			expect: []ipPort{
				{
					ip:   net.IP{0x20, 0x01, 0x0d, 0xb8, 0x0a, 0x0b, 0x12, 0xf0, 0, 0, 0, 0, 0, 0, 0, 0x1},
					port: defaultPort,
				},
			},
		},
	}

	// explode the cases to include tagged versions of everything
	var cases []testCase
	for _, tc := range baseCases {
		cases = append(cases, tc)
		if !strings.Contains(tc.in, "/") { // don't double tag already tagged cases
			tc2 := testCase{
				name:           tc.name + " (tagged)",
				in:             "foo.bar/" + tc.in,
				expectErr:      tc.expectErr,
				ignoreExpectIP: tc.ignoreExpectIP,
			}
			for _, ipp := range tc.expect {
				tc2.expect = append(tc2.expect, ipPort{
					ip:       ipp.ip,
					port:     ipp.port,
					nodeName: "foo.bar",
				})
			}
			cases = append(cases, tc2)
		}
	}

	for _, tc := range cases {
		tc := tc
		t.Run(tc.name, func(t *testing.T) {
			t.Parallel()
			got, err := m.resolveAddr(tc.in)
			if tc.expectErr {
				require.Error(t, err)
			} else {
				require.NoError(t, err)
				if tc.ignoreExpectIP {
					if len(got) > 1 {
						got = got[0:1]
					}
					for i := 0; i < len(got); i++ {
						got[i].ip = nil
					}
				}
				require.Equal(t, tc.expect, got)
			}
		})
	}
}

@lzhecheng
Copy link
Contributor Author

/test-all /test-ipv6-all /test-ipv6-only-all

@tnqn
Copy link
Member

tnqn commented Aug 26, 2021

@wenqiq the test code you refered have "[]" for IPv6 address while net.IP.String() doesn't add "[]", so I think @lzhecheng 's current code is correct

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnqn
Copy link
Member

tnqn commented Aug 26, 2021

ipv6-only-e2e failure may be related to this change.

--- FAIL: TestAntreaPolicy/TestGroupNoK8sNP/Case=ACNPFQDNPolicy (5.99s)

--- FAIL: TestFlowAggregator (285.22s)
    --- FAIL: TestFlowAggregator/IPv6 (147.89s)
        --- FAIL: TestFlowAggregator/IPv6/IntraNodeFlows (21.78s)
        --- FAIL: TestFlowAggregator/IPv6/IntraNodeDenyConnIngressANP (12.56s)
        --- FAIL: TestFlowAggregator/IPv6/IntraNodeDenyConnEgressANP (11.61s)
        --- PASS: TestFlowAggregator/IPv6/IntraNodeDenyConnNP (10.44s)
        --- FAIL: TestFlowAggregator/IPv6/InterNodeFlows (22.39s)
        --- PASS: TestFlowAggregator/IPv6/InterNodeDenyConnIngressANP (5.77s)
        --- PASS: TestFlowAggregator/IPv6/InterNodeDenyConnEgressANP (5.92s)
        --- PASS: TestFlowAggregator/IPv6/InterNodeDenyConnNP (9.60s)
        --- FAIL: TestFlowAggregator/IPv6/ToExternalFlows (16.79s)
        --- PASS: TestFlowAggregator/IPv6/LocalServiceAccess (13.97s)
        --- PASS: TestFlowAggregator/IPv6/RemoteServiceAccess (13.97s)

ipv6-only-conformance-for-pull-request failure seems due to resource shortage:

  should create a LimitRange with defaults and ensure pod has those defaults applied. [Conformance]
  /workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:703
[BeforeEach] [sig-scheduling] LimitRange
  /workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:178
STEP: Creating a kubernetes client
Aug 26 03:37:31.958: INFO: >>> kubeConfig: /tmp/kubeconfig-761388345
STEP: Building a namespace api object, basename limitrange
STEP: Waiting for a default service account to be provisioned in namespace
[It] should create a LimitRange with defaults and ensure pod has those defaults applied. [Conformance]
  /workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:703
STEP: Creating a LimitRange
STEP: Setting up watch
STEP: Submitting a LimitRange
Aug 26 03:37:31.994: INFO: observed the limitRanges list
STEP: Verifying LimitRange creation was observed
STEP: Fetching the LimitRange to ensure it has proper values
Aug 26 03:37:32.001: INFO: Verifying requests: expected map[cpu:{{100 -3} {<nil>} 100m DecimalSI} ephemeral-storage:{{214748364800 0} {<nil>}  BinarySI} memory:{{209715200 0} {<nil>}  BinarySI}] with actual map[cpu:{{100 -3} {<nil>} 100m DecimalSI} ephemeral-storage:{{214748364800 0} {<nil>}  BinarySI} memory:{{209715200 0} {<nil>}  BinarySI}]
Aug 26 03:37:32.001: INFO: Verifying limits: expected map[cpu:{{500 -3} {<nil>} 500m DecimalSI} ephemeral-storage:{{536870912000 0} {<nil>} 500Gi BinarySI} memory:{{524288000 0} {<nil>} 500Mi BinarySI}] with actual map[cpu:{{500 -3} {<nil>} 500m DecimalSI} ephemeral-storage:{{536870912000 0} {<nil>} 500Gi BinarySI} memory:{{524288000 0} {<nil>} 500Mi BinarySI}]
STEP: Creating a Pod with no resource requirements
STEP: Ensuring Pod has resource requirements applied from LimitRange
Aug 26 03:37:32.040: INFO: Verifying requests: expected map[cpu:{{100 -3} {<nil>} 100m DecimalSI} ephemeral-storage:{{214748364800 0} {<nil>}  BinarySI} memory:{{209715200 0} {<nil>}  BinarySI}] with actual map[cpu:{{100 -3} {<nil>} 100m DecimalSI} ephemeral-storage:{{214748364800 0} {<nil>}  BinarySI} memory:{{209715200 0} {<nil>}  BinarySI}]
Aug 26 03:37:32.040: INFO: Verifying limits: expected map[cpu:{{500 -3} {<nil>} 500m DecimalSI} ephemeral-storage:{{536870912000 0} {<nil>} 500Gi BinarySI} memory:{{524288000 0} {<nil>} 500Mi BinarySI}] with actual map[cpu:{{500 -3} {<nil>} 500m DecimalSI} ephemeral-storage:{{536870912000 0} {<nil>} 500Gi BinarySI} memory:{{524288000 0} {<nil>} 500Mi BinarySI}]
STEP: Creating a Pod with partial resource requirements
STEP: Ensuring Pod has merged resource requirements applied from LimitRange
Aug 26 03:37:32.047: INFO: Verifying requests: expected map[cpu:{{300 -3} {<nil>} 300m DecimalSI} ephemeral-storage:{{161061273600 0} {<nil>} 150Gi BinarySI} memory:{{157286400 0} {<nil>} 150Mi BinarySI}] with actual map[cpu:{{300 -3} {<nil>} 300m DecimalSI} ephemeral-storage:{{161061273600 0} {<nil>} 150Gi BinarySI} memory:{{157286400 0} {<nil>} 150Mi BinarySI}]
Aug 26 03:37:32.047: INFO: Verifying limits: expected map[cpu:{{300 -3} {<nil>} 300m DecimalSI} ephemeral-storage:{{536870912000 0} {<nil>} 500Gi BinarySI} memory:{{524288000 0} {<nil>} 500Mi BinarySI}] with actual map[cpu:{{300 -3} {<nil>} 300m DecimalSI} ephemeral-storage:{{536870912000 0} {<nil>} 500Gi BinarySI} memory:{{524288000 0} {<nil>} 500Mi BinarySI}]
STEP: Failing to create a Pod with less than min resources
STEP: Failing to create a Pod with more than max resources
STEP: Updating a LimitRange
STEP: Verifying LimitRange updating is effective
STEP: Creating a Pod with less than former min resources
STEP: Failing to create a Pod with more than max resources
STEP: Deleting a LimitRange
STEP: Verifying the LimitRange was deleted
Aug 26 03:37:39.093: INFO: limitRange is already deleted
STEP: Creating a Pod with more than former max resources
Aug 26 03:37:39.095: FAIL: Unexpected error:
    <*errors.StatusError | 0xc001191b80>: {
        ErrStatus: {
            TypeMeta: {Kind: "", APIVersion: ""},
            ListMeta: {
                SelfLink: "",
                ResourceVersion: "",
                Continue: "",
                RemainingItemCount: nil,
            },
            Status: "Failure",
            Message: "Pod \"pfpod2\" is invalid: [spec.containers[0].resources.requests: Invalid value: \"600Mi\": must be less than or equal to memory limit, spec.containers[0].resources.requests: Invalid value: \"600m\": must be less than or equal to cpu limit, spec.containers[0].resources.requests: Invalid value: \"600Gi\": must be less than or equal to ephemeral-storage limit]",
            Reason: "Invalid",
            Details: {
                Name: "pfpod2",
                Group: "",
                Kind: "Pod",
                UID: "",
                Causes: [
                    {
                        Type: "FieldValueInvalid",
                        Message: "Invalid value: \"600Mi\": must be less than or equal to memory limit",
                        Field: "spec.containers[0].resources.requests",
                    },
                    {
                        Type: "FieldValueInvalid",
                        Message: "Invalid value: \"600m\": must be less than or equal to cpu limit",
                        Field: "spec.containers[0].resources.requests",
                    },
                    {
                        Type: "FieldValueInvalid",
                        Message: "Invalid value: \"600Gi\": must be less than or equal to ephemeral-storage limit",
                        Field: "spec.containers[0].resources.requests",
                    },
                ],
                RetryAfterSeconds: 0,
            },
            Code: 422,
        },
    }
    Pod "pfpod2" is invalid: [spec.containers[0].resources.requests: Invalid value: "600Mi": must be less than or equal to memory limit, spec.containers[0].resources.requests: Invalid value: "600m": must be less than or equal to cpu limit, spec.containers[0].resources.requests: Invalid value: "600Gi": must be less than or equal to ephemeral-storage limit]
occurred

Full Stack Trace
k8s.io/kubernetes/test/e2e/scheduling.glob..func1.1()
	/workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/scheduling/limit_range.go:240 +0x2529
k8s.io/kubernetes/test/e2e.RunE2ETests(0xc0020a0b00)
	_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/e2e.go:125 +0x324
k8s.io/kubernetes/test/e2e.TestE2E(0xc0020a0b00)
	_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/e2e_test.go:111 +0x2b
testing.tRunner(0xc0020a0b00, 0x4af5e90)
	/usr/local/go/src/testing/testing.go:909 +0xc9
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:960 +0x350
[AfterEach] [sig-scheduling] LimitRange
  /workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:179
STEP: Collecting events from namespace "limitrange-9529".
STEP: Found 6 events.
Aug 26 03:37:39.099: INFO: At 0001-01-01 00:00:00 +0000 UTC - event for pfpod: {default-scheduler } FailedScheduling: 0/3 nodes are available: 3 Insufficient ephemeral-storage.
Aug 26 03:37:39.099: INFO: At 0001-01-01 00:00:00 +0000 UTC - event for pfpod: {default-scheduler } FailedScheduling: 0/3 nodes are available: 3 Insufficient ephemeral-storage.
Aug 26 03:37:39.099: INFO: At 0001-01-01 00:00:00 +0000 UTC - event for pod-no-resources: {default-scheduler } FailedScheduling: 0/3 nodes are available: 3 Insufficient ephemeral-storage.
Aug 26 03:37:39.100: INFO: At 0001-01-01 00:00:00 +0000 UTC - event for pod-no-resources: {default-scheduler } FailedScheduling: 0/3 nodes are available: 3 Insufficient ephemeral-storage.
Aug 26 03:37:39.100: INFO: At 0001-01-01 00:00:00 +0000 UTC - event for pod-partial-resources: {default-scheduler } FailedScheduling: 0/3 nodes are available: 3 Insufficient ephemeral-storage.
Aug 26 03:37:39.100: INFO: At 0001-01-01 00:00:00 +0000 UTC - event for pod-partial-resources: {default-scheduler } FailedScheduling: 0/3 nodes are available: 3 Insufficient ephemeral-storage.
Aug 26 03:37:39.102: INFO: POD                    NODE  PHASE    GRACE  CONDITIONS
Aug 26 03:37:39.102: INFO: pfpod                        Pending         [{PodScheduled False 0001-01-01 00:00:00 +0000 UTC 2021-08-26 03:37:34 +0000 UTC Unschedulable 0/3 nodes are available: 3 Insufficient ephemeral-storage.}]
Aug 26 03:37:39.102: INFO: pod-no-resources             Pending         [{PodScheduled False 0001-01-01 00:00:00 +0000 UTC 2021-08-26 03:37:32 +0000 UTC Unschedulable 0/3 nodes are available: 3 Insufficient ephemeral-storage.}]
Aug 26 03:37:39.103: INFO: pod-partial-resources        Pending         [{PodScheduled False 0001-01-01 00:00:00 +0000 UTC 2021-08-26 03:37:32 +0000 UTC Unschedulable 0/3 nodes are available: 3 Insufficient ephemeral-storage.}]
Aug 26 03:37:39.103: INFO: 

@lzhecheng
Copy link
Contributor Author

/test-e2e /test-ipv6-only-conformance /test-ipv6-only-e2e /test-windows-conformance /test-windows-networkpolicy

@lzhecheng
Copy link
Contributor Author

@tnqn There're two failed checks. I considered the test results of this PR and others,

I think Windows-networkpolicy is flaky and this PR has little to do with it.

The failure case in ipv6-only-e2e is ACNPFQDNPolicy which failed at other PR's test result as well. The PR to add it didn't test ipv6-only-e2e. I think there's something wrong and this PR won't fix it.

I think we can get this PR merged. Please share your idea.

@tnqn
Copy link
Member

tnqn commented Aug 26, 2021

@lzhecheng OK, we can merge this. Please file an issue for FQDN failure, @GraysonWu may take a look.

@tnqn
Copy link
Member

tnqn commented Aug 26, 2021

@lzhecheng what about TestFlowAggregator failures?

@lzhecheng
Copy link
Contributor Author

@lzhecheng what about TestFlowAggregator failures?

@tnqn It didn't fail. It is the no. 475 of ipv6-only-e2e test right? There's only 1 failure.

--- FAIL: TestAntreaPolicy/TestGroupNoK8sNP/Case=ACNPFQDNPolicy (5.95s)

@tnqn
Copy link
Member

tnqn commented Aug 26, 2021

@lzhecheng what about TestFlowAggregator failures?

@tnqn It didn't fail. It is the no. 475 of ipv6-only-e2e test right? There's only 1 failure.

--- FAIL: TestAntreaPolicy/TestGroupNoK8sNP/Case=ACNPFQDNPolicy (5.95s)

You are right. I was looking at wrong build. Then obviously FQDN IPv6 test failed on all PRs, meaning it's not related to this PR. I'm merging this.

@tnqn tnqn merged commit f425a87 into antrea-io:main Aug 26, 2021
@lzhecheng
Copy link
Contributor Author

@tnqn An issue has been created. #2653

@lzhecheng lzhecheng deleted the issue_2426 branch August 26, 2021 13:28
Copy link
Contributor

@wenqiq wenqiq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nodeConfig.NodeIPv4Addr is nil in pure IPv6 cluster which would cause panic in agent.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1b9b101]

goroutine 1 [running]:
main.run(0xc00036a060)
	/home/ubuntu/go/src/antrea/cmd/antrea-agent/agent.go:233 +0x1841
main.newAgentCommand.func1(0xc0001fa840, {0xc0001ae800, 0x0, 0x8})
	/home/ubuntu/go/src/antrea/cmd/antrea-agent/main.go:57 +0x1ef
github.com/spf13/cobra.(*Command).execute(0xc0001fa840, {0xc000132010, 0x8, 0x8})
	/home/ubuntu/go/src/antrea/vendor/github.com/spf13/cobra/command.go:854 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001fa840)
	/home/ubuntu/go/src/antrea/vendor/github.com/spf13/cobra/command.go:958 +0x3ad
github.com/spf13/cobra.(*Command).Execute(...)
	/home/ubuntu/go/src/antrea/vendor/github.com/spf13/cobra/command.go:895
main.main()
	/home/ubuntu/go/src/antrea/cmd/antrea-agent/main.go:37 +0x4a

Fixed in #2655

wenqiq added a commit to wenqiq/antrea that referenced this pull request Sep 1, 2021
…antrea-io#2196

Fixed agent start fail nil panic in pure IPv6 cluster. Related antrea-io#2436

Signed-off-by: Wenqi Qiu <[email protected]>
wenqiq added a commit to wenqiq/antrea that referenced this pull request Sep 1, 2021
…antrea-io#2196

Fixed agent start fail nil panic in pure IPv6 cluster. Related antrea-io#2436

Signed-off-by: Wenqi Qiu <[email protected]>
wenqiq added a commit to wenqiq/antrea that referenced this pull request Sep 1, 2021
…antrea-io#2196

Fixed agent start fail nil panic in pure IPv6 cluster. Related antrea-io#2436

Signed-off-by: Wenqi Qiu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants