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

🐛 IP reuse: Fix M3d/IPClaim deletion bug #1255

Conversation

lentzi90
Copy link
Member

@lentzi90 lentzi90 commented Oct 9, 2023

Manual cherry-pick of #1251

What this PR does / why we need it:

When listing the IPClaims, we currently only select by labels, so there is no limit on what namespace the IPClaim belongs to. The labels are based on the name of the IPPool and the name of the Metal3Data. Within the same namespace these will be unique, but not necessarily cluster wide.

This commit limits the list of IPClaims to the same namespace as the Metal3Data. It also adds a few unit tests to check the behavior when we have multiple IPClaims, potentially in separate namespaces and with identical labels.

When listing the IPClaims, we currently only select by labels, so there
is no limit on what namespace the IPClaim belongs to. The labels are
based on the name of the IPPool and the name of the Metal3Data. Within
the same namespace these will be unique, but not necessarily cluster
wide.

This commit limits the list of IPClaims to the same namespace as the
Metal3Data. It also adds a few unit tests to check the behavior when we
have multiple IPClaims, potentially in separate namespaces and with
identical labels.
@metal3-io-bot metal3-io-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 9, 2023
@lentzi90
Copy link
Member Author

lentzi90 commented Oct 9, 2023

/test-ubuntu-e2e-integration-release-1-5

Copy link
Member

@kashifest kashifest left a comment

Choose a reason for hiding this comment

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

/approve

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kashifest

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 9, 2023
@mboukhalfa
Copy link
Member

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 9, 2023
@metal3-io-bot metal3-io-bot merged commit 1d9848d into metal3-io:release-1.5 Oct 9, 2023
11 checks passed
@metal3-io-bot metal3-io-bot deleted the lentzi90/release-1.5-ip-reuse-fix branch October 9, 2023 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants