Skip to content

Fix issues with deprovisioning after an error/failover#745

Merged
metal3-io-bot merged 2 commits intometal3-io:masterfrom
zaneb:deprov-fixes
Jan 20, 2021
Merged

Fix issues with deprovisioning after an error/failover#745
metal3-io-bot merged 2 commits intometal3-io:masterfrom
zaneb:deprov-fixes

Conversation

@zaneb
Copy link
Copy Markdown
Member

@zaneb zaneb commented Dec 8, 2020

If provisioning fails and the node ends up in the deploy failed state,
we try to recover by deprovisioning. That would work better if we
actually handled deploy failed in Deprovision().

Only call Adopt() if the previous provisioning completed and recorded
the requisite image data.

@metal3-io-bot metal3-io-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 8, 2020
@zaneb
Copy link
Copy Markdown
Member Author

zaneb commented Dec 8, 2020

/test-integration

@zaneb zaneb requested a review from dhellmann January 5, 2021 15:15
Copy link
Copy Markdown
Member

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

This looks good.

Comment thread controllers/metal3.io/baremetalhost_controller.go
@metal3-io-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, zaneb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@zaneb
Copy link
Copy Markdown
Member Author

zaneb commented Jan 15, 2021

/test-integration

zaneb added 2 commits January 15, 2021 15:54
If provisioning fails and the node ends up in the deploy failed state,
we try to recover by deprovisioning. That would work better if we
actually handled deploy failed in Deprovision().
In the deprovisioning state, calling Adopt() on a freshly-reregistered
host will fail if we didn't previously complete provisioning because
there will be no image data stored in the status to pass to the node for
adoption.

Only call Adopt() if the previous provisioning completed and recorded
the requisite image data.

If the node has just been re-registered, it will be in the manageable
state anyway, and thus will still get cleaned before it is next
provisioned.
@zaneb
Copy link
Copy Markdown
Member Author

zaneb commented Jan 16, 2021

/test-integration

@hardys
Copy link
Copy Markdown
Member

hardys commented Jan 20, 2021

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 20, 2021
@metal3-io-bot metal3-io-bot merged commit 1b56112 into metal3-io:master Jan 20, 2021
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants