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
Canonical Juju
Expired
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
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.