Skip to content

ipam: do not assign v4 addresses for status.IPV6 #9102

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

Merged
merged 2 commits into from
Sep 2, 2019
Merged

Conversation

borkmann
Copy link
Member

@borkmann borkmann commented Sep 2, 2019

/cc @tgraf ptal


This change is Reviewable

Spotted by inspection. status.IPV6 should only hold v6 addresses
that we prepped earlier. Only the allocv4 is merged and holds both
but not v4.

Fixes: b2ff83a ("ipam: Provide ownership information of IP allocations")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
@borkmann borkmann added kind/bug This is a bug in the Cilium logic. needs-backport/1.6 labels Sep 2, 2019
@borkmann borkmann requested review from tgraf and a team September 2, 2019 10:22
@borkmann
Copy link
Member Author

borkmann commented Sep 2, 2019

test-me-please

@coveralls
Copy link

coveralls commented Sep 2, 2019

Coverage Status

Coverage decreased (-0.02%) to 44.002% when pulling fdda402 on pr/ipam-v6-fix into 6c21973 on master.

After both fixes, result now looks proper:

  # ./cilium/cilium status --verbose -o json
  [...]
  "ipam": {
    "allocations": {
      "192.168.1.229": "health",
      "192.168.211.128": "router",
      "192.168.247.238": "/ [restored]",
      "2001:db8:5::213c": "router",
      "2001:db8:5::9761": "health",
      "2001:db8:5::d965": "/ [restored]"
    },
    "ipv4": [
      "192.168.247.238",
      "192.168.1.229",
      "192.168.211.128"
    ],
    "ipv6": [
      "2001:db8:5::213c",
      "2001:db8:5::9761",
      "2001:db8:5::d965"
    ],
    "status": "IPv4: 3/65535 allocated from 192.168.0.0/16, IPv6: 3/65535 allocated from 2001:db8:5::/112"
  },
  [...]

Fixes: #9099
Fixes: ef23e9c ("ipam: Define interface for allocator")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
@borkmann borkmann requested a review from a team as a code owner September 2, 2019 10:48
@borkmann
Copy link
Member Author

borkmann commented Sep 2, 2019

test-me-please

@borkmann borkmann merged commit b2a3b3c into master Sep 2, 2019
@borkmann borkmann deleted the pr/ipam-v6-fix branch September 2, 2019 13:55
@aanm aanm mentioned this pull request Sep 6, 2019
@aanm aanm added the release-note/misc This PR makes changes that have no direct user impact. label Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is a bug in the Cilium logic. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants