Rework logic handling reserved orphaned nodes in the conductor
If a conductor dies while holding a reservation, the node can get
stuck in its current state. Currently the conductor that takes
over the node only cleans it up if it's in the DEPLOYING state.
This change applies the same logic for all nodes:
1. Reservation is cleared by the conductor that took over the node
no matter what provision state.
2. CLEANING is also aborted, nodes are moved to CLEAN FAIL with
maintenance on.
3. Target power state is cleared as well.
The reservation is cleared even for nodes in maintenance mode,
otherwise it's impossible to move them out of maintenance.
Change-Id: I379c1335692046ca9423fda5ea68d2f10c065cb5
Closes-Bug: #1588901
(cherry picked from commit 5694b98fc81032933b112528bf08cb6688fa7c1a)
Reviewed: https:/ /review. openstack. org/554202 /git.openstack. org/cgit/ openstack/ ironic/ commit/ ?id=a90b999a2d8 afec0476dbd82d4 eb2578ece313d0
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit a90b999a2d8afec 0476dbd82d4eb25 78ece313d0
Author: Dmitry Tantsur <email address hidden>
Date: Tue Feb 20 19:47:52 2018 +0100
Rework logic handling reserved orphaned nodes in the conductor
If a conductor dies while holding a reservation, the node can get
stuck in its current state. Currently the conductor that takes
over the node only cleans it up if it's in the DEPLOYING state.
This change applies the same logic for all nodes:
1. Reservation is cleared by the conductor that took over the node
no matter what provision state.
2. CLEANING is also aborted, nodes are moved to CLEAN FAIL with
maintenance on.
3. Target power state is cleared as well.
The reservation is cleared even for nodes in maintenance mode,
otherwise it's impossible to move them out of maintenance.
Change-Id: I379c1335692046 ca9423fda5ea68d 2f10c065cb5 33b112528bf08cb 6688fa7c1a)
Closes-Bug: #1588901
(cherry picked from commit 5694b98fc810329