Machine.SetInstanceStatus not strict on status

Bug #1657712 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju
Triaged
Low
Unassigned

Bug Description

If you look at Machine.SetStatus it explicitly checks what values you're allowed to pass to it, and certain states are not allowed at certain times.
Machine.SetInstanceStatus has no such safeguards, which means it is very easy to pass an InstanceStatus that isn't in the expected set of states.

Consider adding something like the attached patch.

Obviously you also need to deal with the fallout. One of the key pieces is that *many* code paths actually pass status.Pending, we need to confirm if that is a legitimate status, and how it differs from status.Provisioning. According to the original design document, Pending was not one of the official states.

Revision history for this message
John A Meinel (jameinel) wrote :

Strict SetInstanceStatus states.

description: updated
Revision history for this message
Anastasia (anastasia-macmood) wrote :

As this is a tech-debt item, I am lowering its Importance.

Changed in juju:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers