libvirt: guestfs api makes nova-compute hang
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Qin Zhao | ||
Kilo |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Latest Kilo code.
In inspect_
And example of this problem is:
2015-05-09 17:07:08.393 4449 DEBUG nova.virt.
2015-05-09 17:08:35.443 4449 DEBUG nova.virt.
2015-05-09 17:08:35.457 4449 DEBUG nova.openstack.
2015-05-09 17:08:35.461 4449 INFO oslo_messaging.
2015-05-09 17:08:35.472 4449 ERROR nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
2015-05-09 17:08:35.472 4449 TRACE nova.compute.
tags: | added: kilo-backport-potential libvirt |
Changed in nova: | |
importance: | Undecided → High |
Changed in nova: | |
milestone: | none → liberty-1 |
status: | Fix Committed → Fix Released |
no longer affects: | nova/kilo |
tags: | removed: kilo-backport-potential |
Changed in nova: | |
milestone: | liberty-1 → 12.0.0 |
From the first two lines of log, we can know that launch() of guestfs api in inspect_ capabilities( ) takes nearly 90 seconds to complete. And during this time frame, nova-compute cannot switch to other green threads. Since rpc_response_ timeout= 60, rabbitmq client immediately encounters a timeout error, when it resumes to run.
2015-05-09 17:07:08.393 4449 DEBUG nova.virt. disk.vfs. api [req-1f7c1104- 2679-43a5- bbcb-f73114ce91 03 - - - - -] Using primary VFSGuestFS instance_for_image /usr/lib/ python2. 7/site- packages/ nova/virt/ disk/vfs/ api.py: 50 disk.vfs. guestfs [req-1f7c1104- 2679-43a5- bbcb-f73114ce91 03 - - - - -] Setting up appliance for /var/lib/ nova/instances/ 0517e2a9- 469c-43f4- a129-f489fc1c83 56/disk qcow2 setup /usr/lib/ python2. 7/site- packages/ nova/virt/ disk/vfs/ guestfs. py:169
2015-05-09 17:08:35.443 4449 DEBUG nova.virt.
During my investigation, launch() of guestfs api always takes more than 10 seconds to complete, and will take very long time, if server is busy or its cache file has not been created. Anyway, it does not make sense to invoke a long blocking call in a green thread.