powering off and on an instance can result in instance boot failure due to serial port handling race
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
The following is specific to the libvirt driver.
When we call power_off() it calls _destroy(), which in turn calls self._get_
Then when we call power_on(), it again calls _destroy(), which again calls self._get_
So in the case where one or more of those ports had been allocated to another instance, we call serial_
Then as part of power_on() we will create new XML with new serial ports, which could select the ports that we just removed from ALLOCATED_PORTS (which are actually in use by another instance). When qemu tries to bind to this port it will fail, causing the instance to error out and stay in the SHUTOFF state.
One possible solution would be to call guest.detach_
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
I am thinking about that we can change the structure of ALLOCATED_PORTS, use the instance_uuid as key to record these ports are being used by specific server. Only release ports that are not used by other servers when we call serial_ console. release_ port() during destroy a server.