Skip to content

AzureMachinePoolMachine: avoid setting FailureReason/FailureMessage #5558

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

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

Conversation

mweibel
Copy link
Contributor

@mweibel mweibel commented Apr 9, 2025

What type of PR is this?
/kind bug

What this PR does / why we need it:
Field will get deprecated in v1beta2, setting this currently avoids the Machine from being reconciled at all which does not make sense in this case because a Failed provisioningState is not necessarily terminal

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #5303

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • cherry-pick candidate

Release note:

avoids marking an AzureMachinePoolMachine as terminal failure on provisioning failure. This ensures potential recovery from provisioning failure is handled correctly.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels Apr 9, 2025
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 9, 2025
@k8s-ci-robot k8s-ci-robot requested review from Jont828 and nojnhuh April 9, 2025 07:06
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 9, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @mweibel. 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-sigs/prow repository.

Copy link

codecov bot commented Apr 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.95%. Comparing base (8a1f692) to head (12ff489).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5558      +/-   ##
==========================================
+ Coverage   52.94%   52.95%   +0.01%     
==========================================
  Files         272      272              
  Lines       29525    29523       -2     
==========================================
+ Hits        15631    15633       +2     
+ Misses      13087    13083       -4     
  Partials      807      807              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mboersma
Copy link
Contributor

/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 Apr 16, 2025
@mboersma
Copy link
Contributor

@mweibel you may need to rebase this now that #5565 has merged to get the Netlify / docs tasks to pass. Sorry about that!

field will get deprecated in v1beta2, setting this currently avoids the Machine from being reconciled at all which does not make sense in this case because a Failed provisioningState is not necessarily terminal
@mweibel
Copy link
Contributor Author

mweibel commented Apr 22, 2025

@mboersma apologies for the delay - I was on vacation. Rebase is done 👍

@mweibel
Copy link
Contributor Author

mweibel commented Apr 23, 2025

/retest

Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm
/assign @nawazkh @willie-yao

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

LGTM label has been added.

Git tree hash: d73e72e0df3ed93478cb511369cd15de9dceffb6

Copy link
Contributor

@willie-yao willie-yao left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 23, 2025
@nawazkh
Copy link
Member

nawazkh commented Apr 23, 2025

Just curious, when are we updating to v1beta2 ?
/hold

@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 Apr 23, 2025
@nawazkh
Copy link
Member

nawazkh commented Apr 23, 2025

Also this PR seems to be related to my comment here #5537 (comment)

However, I agree we should be removing the steps to set the failure reason and failure message. But should that removal be in tandem with v1beta2 update ?

@willie-yao
Copy link
Contributor

/approve cancel

Still lgtm but I want to address Nawaz's concerns first. Could be related to #5537 (comment)

@k8s-ci-robot
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 mboersma. For more information see the 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

@k8s-ci-robot k8s-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 23, 2025
@mweibel
Copy link
Contributor Author

mweibel commented Apr 25, 2025

Just curious, when are we updating to v1beta2 ?

That's a good question. But I think it also relates to the broader CAPI v1beta2 MP status.

There are quite a few missing changes in CAPI itself to make MPs ready for v1beta2 - see kubernetes-sigs/cluster-api#11947. There are not enough maintainers at the moment. I plan to step up a bit but my time at the moment is too limited unfortunately. I need to reorganize a few things first.

This change here is somewhat relevant to v1beta2 as for v1beta2 we don't have the FailureMessage/Reason fields anymore. However, this also just ensures for the current implementation that an AzureMachine is not marked as terminally failed when it is not actually the case.

@mweibel
Copy link
Contributor Author

mweibel commented May 5, 2025

is there anything else I can do to make this move along?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/bug Categorizes issue or PR as related to a bug. 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

AzureMachinePoolMachine marked as terminally failed when ProvisioningState is set to Failed
5 participants