Comment 3 for bug 1492026

Revision history for this message
Tony Breeds (o-tony) wrote : Re: domain.attachDeviceFlags randomly doesn't do anything in libvirt

After more digging I don't think this is a libvirt problem. it *could* be a qemu problem or guest kernel problem.

Looking at the logs starting at:
http://logs.openstack.org/55/218355/6/check/gate-tempest-dsvm-full/e0da291/console.html#_2015-09-02_17_48_53_884

You can trace the process of test_stamp_pattern() down to:
215: server_from_snapshot = self._boot_image(snapshot_image['id'])
http://logs.openstack.org/55/218355/6/check/gate-tempest-dsvm-full/e0da291/console.html#_2015-09-02_17_48_54_005
where we see:
2015-09-02 17:41:56,742 8653 DEBUG [tempest.scenario.manager] Creating a server (name: tempest-TestStampPattern-811565472, image: eb0ab3d7-8cbe-479e-9e7f-1d106f02ddf4, flavor: 42)

Checking the n-cpu logs we see:
http://logs.openstack.org/55/218355/6/check/gate-tempest-dsvm-full/e0da291/logs/screen-n-cpu.txt.gz#_2015-09-02_17_42_01_490
"
  <uuid>3ac46e96-ab71-4808-9fe0-4d97f16f9dca</uuid>
  <name>instance-00000062</name>
  <memory>65536</memory>
  <vcpu>1</vcpu>
  <metadata>
    <nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
      <nova:package version="12.0.0"/>
      <nova:name>tempest-TestStampPattern-811565472</nova:name>
"
So we booted instance-00000062 to fulfil this request.

We then get down to:
226: device = self._attach_volume(server_from_snapshot,
227: volume_from_snapshot)
228: self._wait_for_volume_available_on_the_system(ip_for_snapshot, device)

We see the virDomainAttachDeviceFlags for instance-00000062 at:
http://logs.openstack.org/55/218355/6/check/gate-tempest-dsvm-full/e0da291/logs/libvirt/libvirtd.txt.gz#_2015-09-02_17_42_10_274

and from:
http://logs.openstack.org/55/218355/6/check/gate-tempest-dsvm-full/e0da291/logs/libvirt/libvirtd.txt.gz#_2015-09-02_17_42_10_829
to:
http://logs.openstack.org/55/218355/6/check/gate-tempest-dsvm-full/e0da291/logs/libvirt/libvirtd.txt.gz#_2015-09-02_17_42_10_841

We can see what appears to be libvirt successfully attaching the device to the guest The last command shows the new disk in the peripherals list.

I suspect qemu/ guest kernel as we can see at:
http://logs.openstack.org/55/218355/6/check/gate-tempest-dsvm-full/e0da291/console.html#_2015-09-02_17_48_53_953

that the new PCI device was never visible to the guest it should have been 00:05.0.