test_stop_rescue_mode_logs_and_raises_errors breaks when previous_status is DEPLOYED
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Blake Rouse |
Bug Description
The test does:
node = factory.make_Node(
status=
previous_
then later on:
self.patch(node, '_stop'
before calling stop_rescue_mode.
However, stop_rescue_mode doesn't call _stop all the time:
if self.previous_
self.
elif self.previous_
self.
The test should patch _power_cycle when the previous_status is DEPLOYED.
This begs another question: what happens when previous_status is not one
of those three statuses? The answer may be "that can't happen", but it
probably will anyway. Perhaps MAAS should power cycle when
previous_status is DEPLOYED and stop in all other situations.
Related branches
- Newell Jensen (community): Approve
-
Diff: 240 lines (+172/-2)6 files modifiedsrc/maasserver/models/tests/test_node.py (+1/-1)
src/provisioningserver/rpc/cluster.py (+23/-0)
src/provisioningserver/rpc/clusterservice.py (+11/-0)
src/provisioningserver/rpc/pods.py (+28/-0)
src/provisioningserver/rpc/tests/test_clusterservice.py (+30/-1)
src/provisioningserver/rpc/tests/test_pods.py (+79/-0)
description: | updated |
Changed in maas: | |
importance: | High → Critical |
Changed in maas: | |
status: | Triaged → In Progress |
assignee: | nobody → Blake Rouse (blake-rouse) |
milestone: | none → 2.2.0 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |