nova overwrites hw_disk_bus image property with incorrect value

Bug #1321370 reported by cds
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Triaged
Medium
Unassigned

Bug Description

Currently using Havana

Booting from a snapshot with the image property 'hw_disk_bus' = ide boots fine initially. Shutting down/restarting the instance via the dashboard overwrites this value with 'virtio' in the libvirt.xml definition. The value in glance and nova image is correct.

 glance image-show b2e157f7-d244-4f61-afdf-d39af63f67c6
+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| Property 'base_image_ref' | e8ce2f05-f399-4e8f-aa98-c38a8b9d9fbb |
| Property 'hw_disk_bus' | ide |
| Property 'image_location' | snapshot |
| Property 'image_state' | available |
| Property 'image_type' | snapshot |
| Property 'instance_type_ephemeral_gb' | 0 |
| Property 'instance_type_flavorid' | 550ac351-fa21-4315-8309-bec97f00536b |
| Property 'instance_type_id' | 24 |
| Property 'instance_type_memory_mb' | 4096 |
| Property 'instance_type_name' | windows7 |
| Property 'instance_type_root_gb' | 35 |
| Property 'instance_type_rxtx_factor' | 1 |
| Property 'instance_type_swap' | 2000 |
| Property 'instance_type_vcpus' | 2 |
| Property 'instance_uuid' | b34995bc-50f6-4a9f-bc54-f8b62f0b69eb |
| Property 'os_type' | None |
| Property 'owner_id' | 473a5f18d57a4746abfb3d6ed33cea45 |
| Property 'user_id' | 40caf1d1cb994fbfb8c905e68d07b283 |
| checksum | fdad2f12773319dfa8a71dac3cdd4e5a |
| container_format | bare |
| created_at | 2014-04-29T17:29:57 |
| deleted | False |
| disk_format | qcow2 |
| id | b2e157f7-d244-4f61-afdf-d39af63f67c6 |
| is_public | True |
| min_disk | 35 |
| min_ram | 2048 |
| name | pre-migration |
| protected | False |
| size | 12756713472 |
| status | active |
| updated_at | 2014-05-12T14:27:25 |
+---------------------------------------+--------------------------------------+

nova image-show b2e157f7-d244-4f61-afdf-d39af63f67c6
+-------------------------------------+--------------------------------------+
| Property | Value |
+-------------------------------------+--------------------------------------+
| metadata owner_id | 473a5f18d57a4746abfb3d6ed33cea45 |
| minDisk | 35 |
| metadata instance_type_name | windows7 |
| metadata instance_type_swap | 2000 |
| metadata instance_type_memory_mb | 4096 |
| id | b2e157f7-d244-4f61-afdf-d39af63f67c6 |
| metadata instance_type_rxtx_factor | 1 |
| metadata os_type | None |
| metadata image_state | available |
| metadata image_location | snapshot |
| minRam | 2048 |
| status | ACTIVE |
| updated | 2014-05-12T14:27:25Z |
| metadata instance_type_id | 24 |
| metadata instance_type_vcpus | 2 |
| metadata base_image_ref | e8ce2f05-f399-4e8f-aa98-c38a8b9d9fbb |
| progress | 100 |
| metadata instance_type_flavorid | 550ac351-fa21-4315-8309-bec97f00536b |
| OS-EXT-IMG-SIZE:size | 12756713472 |
| metadata image_type | snapshot |
| metadata user_id | 40caf1d1cb994fbfb8c905e68d07b283 |
| name | pre-migration |
| created | 2014-04-29T17:29:57Z |
| metadata instance_uuid | b34995bc-50f6-4a9f-bc54-f8b62f0b69eb |
| server | b34995bc-50f6-4a9f-bc54-f8b62f0b69eb |
| metadata instance_type_root_gb | 35 |
| metadata hw_disk_bus | ide |
| metadata instance_type_ephemeral_gb | 0 |
+-------------------------------------+--------------------------------------+

The libvirt.xml of the instance
   <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/9aeb0a88-513f-4334-bb89-774e8c1d9dbf/disk"/>
      <target bus="virtio" dev="vda"/>
    </disk>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/9aeb0a88-513f-4334-bb89-774e8c1d9dbf/disk.swap"/>
      <target bus="virtio" dev="vdb"/>
    </disk>

Tags: libvirt
Revision history for this message
cds (craigshannonx) wrote :

Workaround is to snapshot the image which was shutdown and redeploy it.

Changed in nova:
importance: Undecided → Medium
tags: added: libvirt
Revision history for this message
Nikola Đipanov (ndipanov) wrote :

Yes - it seems that we need to pass in the image_meta to power_on driver method. I'm looking if we can do it without a roundtrip to glance.

We really should make libvirt.blockinf.get_disk_info (the method that exctracts these kind of things from the image metadata) always require the data to be passed and not make it optional.

Changed in nova:
status: New → Triaged
Revision history for this message
Nikola Đipanov (ndipanov) wrote :

Ah so looks like this is actually fixed in icehouse - we just need to backport it to Havana. See https://bugs.launchpad.net/nova/+bug/1255449 and the related fix.

Let me close this is a dublicate of that - and I will propose a backport for havana stable there.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.