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

Delete Machine when BareMetalHost is deleted #51

Conversation

rwsu
Copy link

@rwsu rwsu commented Feb 22, 2020

This is to ensure a new Machine is created by the MachineSet
controller and that it will contain the latest ProviderSpec.

Signed-off-by: Richard Su rwsu@redhat.com

This is to ensure a new Machine is created by the MachineSet
controller and that it will contain the latest ProviderSpec.

Signed-off-by: Richard Su rwsu@redhat.com
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 22, 2020
@mhrivnak mhrivnak self-assigned this Feb 22, 2020
Signed-off-by: Richard Su <rwsu@redhat.com>
Also, when adding the finalizer, checks to see one doesn't already
exist.

Signed-off-by: Richard Su <rwsu@redhat.com>
Signed-off-by: Richard Su <rwsu@redhat.com>
Signed-off-by: Richard Su <rwsu@redhat.com>
Signed-off-by: Richard Su <rwsu@redhat.com>
Copy link
Member

@mhrivnak mhrivnak left a comment

Choose a reason for hiding this comment

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

LGTM except the one nit.

// When finalizer for BHM is removed but an error occur before
// the Machine is deleted below in the StateDeleting block, the
// Machine should be deleted when no host is found.
log.Print("Deleting machine associated with no host: ", machine.Name)
Copy link
Member

Choose a reason for hiding this comment

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

nit: I'd change this (and the one a few lines below) to "Deleting machine whose associated host is gone." to keep it clear that we don't delete Machines just because they don't have a host.

Message should say the machine is being deleted because the
associated host is gone.

Signed-off-by: Richard Su <rwsu@redhat.com>
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 28, 2020
@mhrivnak
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 28, 2020
@openshift-merge-robot openshift-merge-robot merged commit 827184e into openshift:master Feb 28, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mhrivnak, rwsu

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

honza pushed a commit to honza/cluster-api-provider-baremetal that referenced this pull request Feb 7, 2022
🐛 Multiple updates operation on the BMH openshift#33
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