Noticing this in the trace of that unit test failure:
libvirt: error : internal error: could not initialize domain event timer
...
WARNING [nova.compute.manager] Instance is not stopped. Calling the stop API.
It blows up when trying to (re)start the instance in cloud.py:
Note there is a TODO comment in the ec2 create_image code:
# TODO(yamahata): race condition
# At the moment there is no way to prevent others from
# manipulating instances/volumes/snapshots.
# As other code doesn't take it into consideration, here we don't
# care of it for now. Ostrich algorithm
By ostrich I'm assuming put our heads in the sand. :(
Looking at the code, it stops the instance and then waits for it to be stopped, there is a hard-coded 1 hour timeout in the code and then when it's vm_state is stopped it moves on to creating the snapshot. Once the snapshot is done it goes to start the instance and that's where we hit the invalid task_state failure.
Noticing this in the trace of that unit test failure:
libvirt: error : internal error: could not initialize domain event timer manager] Instance is not stopped. Calling the stop API.
...
WARNING [nova.compute.
It blows up when trying to (re)start the instance in cloud.py:
http:// git.openstack. org/cgit/ openstack/ nova/tree/ nova/api/ ec2/cloud. py#n1746
Note there is a TODO comment in the ec2 create_image code:
# TODO(yamahata): race condition volumes/ snapshots.
# At the moment there is no way to prevent others from
# manipulating instances/
# As other code doesn't take it into consideration, here we don't
# care of it for now. Ostrich algorithm
By ostrich I'm assuming put our heads in the sand. :(
Looking at the code, it stops the instance and then waits for it to be stopped, there is a hard-coded 1 hour timeout in the code and then when it's vm_state is stopped it moves on to creating the snapshot. Once the snapshot is done it goes to start the instance and that's where we hit the invalid task_state failure.
e-r query here: https:/ /review. openstack. org/#/c/ 103119/