Comment 1 for bug 1237688

Revision history for this message
aeva black (tenbrae) wrote :

We discussed this in IRC and agreed, there are two distinct problems here. I'm opening a separate bug for the "API doesn't validate requested state" issue.

To clarify this bug, the issue can be seen from two perspectives.
* power_state should represent the actual power state, so if a machine is OFF, it should be OFF, not ERROR when the last state change request failed
* there's no way at present to recover a node when target_power_state != NULL, but setting this to NULL when catching an error will eat the user's data, and they'll never know that their request failed.

It was suggested to redo the state representation in a way that allows us more flexibility. Something akin to this structure:

power_state: {
  'current':
  'updated_at':
  'requested':
  'requested_at':
  'error':
  'error_at':
}