Comment 2 for bug 1034730

Revision history for this message
Mauro S M Rodrigues (maurorodrigues) wrote :

Investigating for a little while I realized that the problem just happens with instances with a volume attached.

Specifically the snapshot of an instance waits for the disk's file source (you can find that in /opt/stack/nova/nova/virt/libvirt/driver.py", line 787: source = domain.find('devices/disk/source') and then looking for source.get('file')).

This information is gathered from a xml in /opt/stack/nova/instances/instance-<number>/libvirt.xml

When you don't attach a volume to instance during its creation the xml has the follow disk information:

     <disk type="file" device="disk">
       <driver name="qemu" type="qcow2" cache="none"/>
       <source file="/opt/stack/nova/instances/instance-0000000a/disk"/>
       <target bus="virtio" dev="vda"/>
     </disk>

The file attribute is present.

Although when attach the volume during instance creation:

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source dev='/dev/disk/by-path/ip-9.114.219.72:3260-iscsi-iqn.2010-10.org.openstack:volume-64d0a0e0-1732-44a0-84fa-132461fddc7e-lun-1s'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>

The reference to the source now is dev=<value>, so the snapshot crashes when look for the file key on this xml.