-
Notifications
You must be signed in to change notification settings - Fork 30
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
Delete Machine when BareMetalHost is deleted #51
Conversation
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
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>
There was a problem hiding this 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) |
There was a problem hiding this comment.
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>
/lgtm |
[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 |
🐛 Multiple updates operation on the BMH openshift#33
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