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

⚠️ Remove Metal3Machine owner reference from BMH #1742

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kashifest
Copy link
Member

@kashifest kashifest commented May 24, 2024

Metal3Machine should not own BMH. It should consume it and release it when not needed. we already put a M3M consumer reference on BMH. This also would mean that for pivoting use cases we must add the clusterctl move labels in the CRDs. Otherwise BMH wont be pivoted to target clusters.

⚠️ Now, BMH object/CRD needs to have The object has the clusterctl.cluster.x-k8s.io/move label or the clusterctl.cluster.x-k8s.io/move-hierarchy label to make sure BMH is pivoted to target cluster and removed from the source. clusterctl.cluster.x-k8s.io/move and clusterctl.cluster.x-k8s.io/move-hierarchy labels could be applied to single objects or at the CRD level (the label applies to all the objects).

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from kashifest. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 24, 2024
@kashifest
Copy link
Member Author

/hold
This is a WIP

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 24, 2024
@kashifest kashifest changed the title 🌱 Remove Metal3Machine owner reference from BMH WIP: 🌱 Remove Metal3Machine owner reference from BMH May 24, 2024
@metal3-io-bot metal3-io-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 24, 2024
@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-integration-test-main

1 similar comment
@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-integration-test-main

@kashifest
Copy link
Member Author

/test ?

@metal3-io-bot
Copy link
Contributor

@kashifest: The following commands are available to trigger required jobs:

  • /test build
  • /test generate
  • /test gomod
  • /test manifestlint
  • /test markdownlint
  • /test metal3-centos-e2e-integration-test-main
  • /test metal3-ubuntu-e2e-integration-test-main
  • /test shellcheck
  • /test test
  • /test unit

The following commands are available to trigger optional jobs:

  • /test metal3-centos-e2e-basic-test-main
  • /test metal3-centos-e2e-feature-test-main
  • /test metal3-e2e-1-26-1-27-upgrade-test-main
  • /test metal3-e2e-1-27-1-28-upgrade-test-main
  • /test metal3-e2e-1-28-1-29-upgrade-test-main
  • /test metal3-e2e-clusterctl-upgrade-test-main
  • /test metal3-ubuntu-e2e-basic-test-main
  • /test metal3-ubuntu-e2e-feature-test-main

Use /test all to run the following jobs that were automatically triggered:

  • generate
  • gomod
  • manifestlint
  • unit

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@shibaPuppy
Copy link
Contributor

@kashifest
It seems to be PR for the same purpose.
can I close my PR?

@kashifest
Copy link
Member Author

@kashifest It seems to be PR for the same purpose. can I close my PR?

Yes, I am doing the same thing here, I didn't notice you had the same thing in another PR, didnt mean to over step. I am currently testing this since it seems to not passing the pivot scenario so it would need more changes. I am also ok to close my one if you have progressed more.

@shibaPuppy
Copy link
Contributor

@kashifest
i can't spend much time working, so I don't come often.
i will close my PR. :)

@Rozzii Rozzii added this to the 1.8.0 milestone Jun 28, 2024
@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-integration-test-main

1 similar comment
@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-integration-test-main

Metal3Machine should not own BMH. It should consume it and release it when not needed. we already put a M3M consumer reference on BMH. This also would mean that for pivoting use cases we must add the clusterctl move labels in the CRDs. Otherwise BMH wont be pivoted to target clusters.

Signed-off-by: Kashif Khan <[email protected]>
@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-integration-test-main

1 similar comment
@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-integration-test-main

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main

@kashifest
Copy link
Member Author

/test ?

@metal3-io-bot
Copy link
Contributor

@kashifest: The following commands are available to trigger required jobs:

  • /test build
  • /test generate
  • /test gomod
  • /test manifestlint
  • /test markdownlint
  • /test metal3-centos-e2e-integration-test-main
  • /test metal3-ubuntu-e2e-integration-test-main
  • /test shellcheck
  • /test test
  • /test unit

The following commands are available to trigger optional jobs:

  • /test metal3-centos-e2e-basic-test-main
  • /test metal3-centos-e2e-feature-test-main-features
  • /test metal3-centos-e2e-feature-test-main-pivoting
  • /test metal3-centos-e2e-feature-test-main-remediation
  • /test metal3-e2e-1-29-1-30-upgrade-test-main
  • /test metal3-e2e-clusterctl-upgrade-test-main
  • /test metal3-ubuntu-e2e-basic-test-main
  • /test metal3-ubuntu-e2e-feature-test-main-features
  • /test metal3-ubuntu-e2e-feature-test-main-pivoting
  • /test metal3-ubuntu-e2e-feature-test-main-remediation

Use /test all to run the following jobs that were automatically triggered:

  • build
  • generate
  • gomod
  • manifestlint
  • unit

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-feature-test-main-features

@kashifest
Copy link
Member Author

/test metal3-e2e-clusterctl-upgrade-test-main

@kashifest kashifest changed the title WIP: 🌱 Remove Metal3Machine owner reference from BMH 🌱 Remove Metal3Machine owner reference from BMH Nov 26, 2024
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 26, 2024
@kashifest kashifest changed the title 🌱 Remove Metal3Machine owner reference from BMH ⚠️ Remove Metal3Machine owner reference from BMH Nov 26, 2024
@kashifest
Copy link
Member Author

/hold cancel

@metal3-io-bot metal3-io-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 26, 2024
@kashifest
Copy link
Member Author

/test metal3-centos-e2e-feature-test-main-pivoting
/test metal3-centos-e2e-feature-test-main-remediation

@kashifest
Copy link
Member Author

/test metal3-e2e-clusterctl-upgrade-test-main

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-feature-test-main-pivoting

3 similar comments
@kashifest
Copy link
Member Author

/test metal3-centos-e2e-feature-test-main-pivoting

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-feature-test-main-pivoting

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-feature-test-main-pivoting

@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-feature-test-main-pivoting

2 similar comments
@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-feature-test-main-pivoting

@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-feature-test-main-pivoting

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-feature-test-main-pivoting

@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-feature-test-main-pivoting

2 similar comments
@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-feature-test-main-pivoting

@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-feature-test-main-pivoting

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-feature-test-main-pivoting

2 similar comments
@kashifest
Copy link
Member Author

/test metal3-centos-e2e-feature-test-main-pivoting

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-feature-test-main-pivoting

@kashifest
Copy link
Member Author

/hold
For discussion

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 27, 2024
Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

Thank you for doing this!
How should we handle upgrades? From what I can see, we would not automatically remove owner references that are already there, so it would be up to the user to remove them after upgrade I guess.
One alternative we could consider is to keep the code that removes the owner reference when deleting the M3M for one minor release cycle. Then we can say that users must do a rollout in order to get rid of the owner references, or they can do it manually if they prefer. What do you think?

@kashifest
Copy link
Member Author

Thank you for doing this! How should we handle upgrades? From what I can see, we would not automatically remove owner references that are already there, so it would be up to the user to remove them after upgrade I guess. One alternative we could consider is to keep the code that removes the owner reference when deleting the M3M for one minor release cycle. Then we can say that users must do a rollout in order to get rid of the owner references, or they can do it manually if they prefer. What do you think?

Yes we can do that. I thought of writing a doc update and ask users to remove it manually. We can also keep the removal code for one minor cycle and ask for rollout.

@tuminoid
Copy link
Member

This will not make CAPM3 1.9, will it? @kashifest

@tuminoid tuminoid modified the milestones: CAPM3 - v1.9, CAPM3 - v1.10 Dec 17, 2024
@tuminoid
Copy link
Member

This will not make CAPM3 1.9, will it? @kashifest

Discussed offline, this is only going to have a heads-up in 1.9, actual fixes will go to 1.10. Changed milestone accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Status: CAPM3 WIP
Development

Successfully merging this pull request may close these issues.

7 participants