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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bubble up machine drain condition in MachinesReadyCondition #9355

Merged

Conversation

typeid
Copy link
Contributor

@typeid typeid commented Sep 1, 2023

What this PR does / why we need it:
As described in the issue, a failing drain can currently block a scalable resource scale down / delete operation transparently.
This PR attemps to fix this issue by adding DrainingSucceededCondition to the summary of MachinesReadyCondition, bubbling up the drain result in the MachineSet and in the MachineDeployment after #9262.

Which issue(s) this PR fixes:
Fixes #9285

/area machine

@k8s-ci-robot k8s-ci-robot added area/machine Issues or PRs related to machine lifecycle management cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 1, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @typeid!

It looks like this is your first PR to kubernetes-sigs/cluster-api 馃帀. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 馃槂

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 1, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @typeid. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@sbueringer
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 1, 2023
@sbueringer
Copy link
Member

Look reasonable to me

/assign @enxebre @fabriziopandini @vincepri

@fabriziopandini
Copy link
Member

This is a breaking change because it changes the semantic of the Ready condition, but IMO it is a good change to have so I'm +1 (but we should change PR type)
Opinions?

@sbueringer
Copy link
Member

sbueringer commented Dec 13, 2023

This is a breaking change because it changes the semantic of the Ready condition, but IMO it is a good change to have so I'm +1 (but we should change PR type) Opinions?

If this is a breaking change to our API (I don't know about the exact details of the policy for conditions), do we have to wait for the next apiVersion?

@enxebre
Copy link
Member

enxebre commented Dec 14, 2023

I think it's technically a breaking change but in practice a UX bug fix so lgtm. This would only affect Machines that are already signalled for deletion. I can't think atm of any consumer that would be affected in that scenario.

@sbueringer
Copy link
Member

Sounds good to me.

/lgtm

(I'm fine either way regarding the PR title icon)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 14, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 0f48c4ba1ff824023db49223f7b9b4a4f4057a6c

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 2, 2024
@vincepri
Copy link
Member

vincepri commented Jan 2, 2024

/hold

Is it a breaking change? Not really sure, the condition is a summary of other conditions, if the drain doesn't go through, the summary never gets updated. Are we treating the finite set of watched conditions as an API?

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 2, 2024
@typeid
Copy link
Contributor Author

typeid commented Jan 3, 2024

@vincepri judging by the above comments, my understanding is that we're fine categorizing this as a non-breaking/bugfix change.

@sbueringer
Copy link
Member

@vincepri Not sure I understand what you mean with this one:

if the drain doesn't go through, the summary never gets updated.

Isn't the goal of this PR that the summary (aka ready condition) gets updated when the drain doesn't go through?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2024
@vincepri
Copy link
Member

My point was today's behavior, this PR fixes that which in my mind is a good thing

@sbueringer
Copy link
Member

My point was today's behavior, this PR fixes that which in my mind is a good thing

Got it, sounds good to me

Signed-off-by: Claudio Busse cbusse@redhat.com
@typeid typeid force-pushed the 9285_pass_draining_condition branch from 6fc100d to bb9639b Compare January 15, 2024 15:50
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 15, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 15, 2024
@typeid
Copy link
Contributor Author

typeid commented Jan 15, 2024

Rebased, should be good to go then :)

@sbueringer
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 15, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 8fa9900d27c3c2c80da823b615b35009b699b83f

@vincepri
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 15, 2024
@k8s-ci-robot k8s-ci-robot merged commit f6109cd into kubernetes-sigs:main Jan 15, 2024
19 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.7 milestone Jan 15, 2024
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. area/machine Issues or PRs related to machine lifecycle management cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Draining can block transparently a scalable resource scale down / delete operation
6 participants