Comment 1 for bug 1821373

Revision history for this message
Matthew Booth (mbooth-9) wrote :

I intend to fix this by changing instance.save() such that it will:

1. return the expected InstanceUpdateConflict directly without hitting the db if instance.task_state doesn't match expected_task_state.

2. assert that task state is being changed if expected_task_state is set (this would be a programming error).

3. ditto for vm_state.

I believe unit test coverage in test_instance will be sufficient for this change.