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

coordinator: improve determining the default route for IPv6 #2919

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

cyclinder
Copy link
Collaborator

For high kernels, netlink consolidates multiple default routes into the MultiPath field within a single route structure. However, for older kernels, each default route is represented by a separate Route structure.

Thanks for contributing!

What type of PR is this?

  • release/bug

What this PR does / why we need it:

For high kernels, netlink consolidates multiple default routes into the MultiPath field within a single route structure. However, for older kernels, each default route is represented by a separate Route structure.

Which issue(s) this PR fixes:

Fixes #2917

Special notes for your reviewer:

@cyclinder cyclinder added cherrypick-release-v0.7 Cherry-pick the PR to branch release-v0.7. release/none no release note cherrypick-release-v0.8 Cherry-pick the PR to branch release-v0.8. labels Dec 15, 2023
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Merging #2919 (ef2fb32) into main (921f004) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2919   +/-   ##
=======================================
  Coverage   81.15%   81.15%           
=======================================
  Files          49       49           
  Lines        5333     5333           
=======================================
  Hits         4328     4328           
  Misses        850      850           
  Partials      155      155           
Flag Coverage Δ
unittests 81.15% <ø> (ø)

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

@cyclinder
Copy link
Collaborator Author

• [FAILED] [0.255 seconds]
test ippool CR [BeforeEach] [ippoolCR]
/home/runner/work/spiderpool/spiderpool/test/e2e/ippoolcr/ippoolcr_test.go:33
  create and delete batch of ippool and check time cost [D00006]
  /home/runner/work/spiderpool/spiderpool/test/e2e/ippoolcr/ippoolcr_test.go:387

  Timeline >>
  > Enter [BeforeEach] test ippool CR - /home/runner/work/spiderpool/spiderpool/test/e2e/ippoolcr/ippoolcr_test.go:33 @ 12/15/23 04:11:24.188
  Subnet v4-ss-53f07ea2ff27ced overlaps with subnet v4-ss-1f868a4b502c987, the overlapping subnet is: 192.229.96.0/24 
  [FAILED] Unexpected error:
      <*errors.StatusError | 0xc00040f5e0>: 
      admission webhook "spidersubnet.spiderpool.spidernet.io" denied the request: SpiderSubnet.spiderpool.spidernet.io "v4-ss-53f07ea2ff27ced" is invalid: spec.subnet: Invalid value: "192.229.96.0/24": overlap with Subnet v4-ss-1f868a4b502c987 which 'spec.subnet' is 192.229.96.0/24
      {
          ErrStatus: {
              TypeMeta: {Kind: "", APIVersion: ""},
              ListMeta: {
                  SelfLink: "",
                  ResourceVersion: "",
                  Continue: "",
                  RemainingItemCount: nil,
              },
              Status: "Failure",
              Message: "admission webhook \"spidersubnet.spiderpool.spidernet.io\" denied the request: SpiderSubnet.spiderpool.spidernet.io \"v4-ss-53f07ea2ff27ced\" is invalid: spec.subnet: Invalid value: \"192.229.96.0/24\": overlap with Subnet v4-ss-1f868a4b502c987 which 'spec.subnet' is 192.229.96.0/24",
              Reason: "Invalid",
              Details: {
                  Name: "v4-ss-53f07ea2ff27ced",
                  Group: "spiderpool.spidernet.io",
                  Kind: "SpiderSubnet",
                  UID: "",
                  Causes: [
                      {
                          Type: "FieldValueInvalid",
                          Message: "Invalid value: \"192.229.96.0/24\": overlap with Subnet v4-ss-1f868a4b502c987 which 'spec.subnet' is 192.229.96.0/24",
                          Field: "spec.subnet",
                      },
                  ],
                  RetryAfterSeconds: 0,
              },
              Code: 422,
          },
      }
  occurred
  In [BeforeEach] at: /home/runner/work/spiderpool/spiderpool/test/e2e/ippoolcr/ippoolcr_test.go:38 @ 12/15/23 04:11:24.443
  < Exit [BeforeEach] test ippool CR - /home/runner/work/spiderpool/spiderpool/test/e2e/ippoolcr/ippoolcr_test.go:33 @ 12/15/23 04:11:24.443 (255ms)

For high kernels, netlink consolidates multiple default routes into the MultiPath field within a single route structure. However, for older kernels, each default route is represented by a separate Route structure.
@cyclinder cyclinder force-pushed the coordinator/move_ipv6_route branch from 46980a9 to ef2fb32 Compare December 15, 2023 04:50
@ty-dc
Copy link
Collaborator

ty-dc commented Dec 15, 2023

• [FAILED] [0.255 seconds]
test ippool CR [BeforeEach] [ippoolCR]
/home/runner/work/spiderpool/spiderpool/test/e2e/ippoolcr/ippoolcr_test.go:33
  create and delete batch of ippool and check time cost [D00006]
  /home/runner/work/spiderpool/spiderpool/test/e2e/ippoolcr/ippoolcr_test.go:387

  Timeline >>
  > Enter [BeforeEach] test ippool CR - /home/runner/work/spiderpool/spiderpool/test/e2e/ippoolcr/ippoolcr_test.go:33 @ 12/15/23 04:11:24.188
  Subnet v4-ss-53f07ea2ff27ced overlaps with subnet v4-ss-1f868a4b502c987, the overlapping subnet is: 192.229.96.0/24 
  [FAILED] Unexpected error:
      <*errors.StatusError | 0xc00040f5e0>: 
      admission webhook "spidersubnet.spiderpool.spidernet.io" denied the request: SpiderSubnet.spiderpool.spidernet.io "v4-ss-53f07ea2ff27ced" is invalid: spec.subnet: Invalid value: "192.229.96.0/24": overlap with Subnet v4-ss-1f868a4b502c987 which 'spec.subnet' is 192.229.96.0/24
      {
          ErrStatus: {
              TypeMeta: {Kind: "", APIVersion: ""},
              ListMeta: {
                  SelfLink: "",
                  ResourceVersion: "",
                  Continue: "",
                  RemainingItemCount: nil,
              },
              Status: "Failure",
              Message: "admission webhook \"spidersubnet.spiderpool.spidernet.io\" denied the request: SpiderSubnet.spiderpool.spidernet.io \"v4-ss-53f07ea2ff27ced\" is invalid: spec.subnet: Invalid value: \"192.229.96.0/24\": overlap with Subnet v4-ss-1f868a4b502c987 which 'spec.subnet' is 192.229.96.0/24",
              Reason: "Invalid",
              Details: {
                  Name: "v4-ss-53f07ea2ff27ced",
                  Group: "spiderpool.spidernet.io",
                  Kind: "SpiderSubnet",
                  UID: "",
                  Causes: [
                      {
                          Type: "FieldValueInvalid",
                          Message: "Invalid value: \"192.229.96.0/24\": overlap with Subnet v4-ss-1f868a4b502c987 which 'spec.subnet' is 192.229.96.0/24",
                          Field: "spec.subnet",
                      },
                  ],
                  RetryAfterSeconds: 0,
              },
              Code: 422,
          },
      }
  occurred
  In [BeforeEach] at: /home/runner/work/spiderpool/spiderpool/test/e2e/ippoolcr/ippoolcr_test.go:38 @ 12/15/23 04:11:24.443
  < Exit [BeforeEach] test ippool CR - /home/runner/work/spiderpool/spiderpool/test/e2e/ippoolcr/ippoolcr_test.go:33 @ 12/15/23 04:11:24.443 (255ms)

Ah, this is a known issue and it's been happening more and more frequently lately. -_-!!!
Will be repaired soon.

It happens occasionally and helps you re-run CI

@cyclinder cyclinder merged commit fe936b5 into spidernet-io:main Dec 15, 2023
39 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 15, 2023
coordinator: improve determining the default route for IPv6
github-actions bot pushed a commit that referenced this pull request Dec 15, 2023
coordinator: improve determining the default route for IPv6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherrypick-release-v0.7 Cherry-pick the PR to branch release-v0.7. cherrypick-release-v0.8 Cherry-pick the PR to branch release-v0.8. cherrypick-release-v0.9 release/none no release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The egress routing NIC of ipv6 does not meet expectations
3 participants