DeletionTask should remove only nodes that it was scheduled for
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Committed
|
High
|
Przemyslaw Kaminski | ||
6.0.x |
Fix Committed
|
High
|
Unassigned |
Bug Description
Current implementation of
nailgun/
is that it takes a cluster as parameter and when it's executes, removes all cluster's nodes that have the 'pending_deletion' attribute set to True. This is incorrect and could lead to strange behavior.
Scenario:
DeletionTask is scheduled but not yet executed (for example there are some other tasks running in the meantime), user in the UI clicks that some node in cluster is to be deleted but doesn't click 'Deploy Changes' button. The effect is that the 'pending_deletion' attribute is set to True in the database but user hasn't confirmed his change yet and can take that change back in the UI. When the DeletionTask now starts to execute suddenly the node will be removed without user confirmation. Same happens for CLI for which the command 'fuel node remove --node x' also sets 'pending_deletion' to 'True'.
The proposed solution is to explicitly pass node uids as parameters to DeletionTask, instead of cluster.
I have not been able to reproduce it on a live system, I'm just filing this bug based on analysis of the code.
Changed in fuel: | |
importance: | Undecided → High |
no longer affects: | fuel/6.0-updates |
Fix proposed to branch: master /review. openstack. org/151648
Review: https:/