hw_disk_bus='sata' is replaced to scsi when it is attached to additional disk.

Bug #2022093 reported by Artom Lifshitz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

Description
===========
hw_disk_bus='sata' is replaced to scsi when it is attached to addtional disk.

Steps to reproduce
==================
1. set hw_disk_bus=sata in a image
$openstack image set --property hw_disk_bus=sata <image1>
$openstack image set --property hw_disk_bus=sata <image2>
2. launch VM from a volume
3. create a second volume from image2
4. attach created disk to a <vm name>

Expected result
===============
attached volume should be set bus='sata' in xml

Actual result
=============
attached volume is set bus='scsi' in xml

Environment
===========
Reported on Red Hat OpenStack 16.2, aka stable/train with libvirt driver.
https://bugzilla.redhat.com/show_bug.cgi?id=2124828

Revision history for this message
Artom Lifshitz (notartom) wrote :

Reproducing Mel's comment here:

In my testing I found that when we add a volume after the server is
already created, we don't honor hw_disk_bus='sata' and it instead
defaults to 'scsi'. This is also shown in your output. Example from my test:

   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native'/>
       <source dev='/dev/sdc' index='3'/>
       <backingStore/>
       <target dev='sda' bus='sata'/>
       <serial>f0314323-07a8-4d0c-8f8f-01de2f2df029</serial>
       <alias name='sata0-0-0'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native'/>
       <source dev='/dev/sdd' index='2'/>
       <backingStore/>
       <target dev='sdb' bus='scsi'/>
       <serial>c0166f77-bf65-48a8-8393-bf2dfd7bdcec</serial>
       <alias name='scsi0-0-1'/>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>

Contrast that with specifying two volumes at server create time where
both disks get bus='sata':

   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native'/>
       <source dev='/dev/sdc' index='2'/>
       <backingStore/>
       <target dev='sda' bus='sata'/>
       <serial>f0314323-07a8-4d0c-8f8f-01de2f2df029</serial>
       <alias name='sata0-0-0'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native'/>
       <source dev='/dev/sdd' index='1'/>
       <backingStore/>
       <target dev='sdb' bus='sata'/>
       <serial>c0166f77-bf65-48a8-8393-bf2dfd7bdcec</serial>
       <alias name='sata0-0-1'/>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>

I think that not honoring hw_disk_bus='sata' when adding a volume is
probably a bug.

I don't know if it would fixing that would fix your issue though, as I'm
not able to reproduce the same behavior you are seeing. And according to
the doc [3], it should have stayed in order if it "preserves the order
of the buses", so I'm not sure why it's happening.

I think you can go ahead and open a BZ about this issue and at the very
least, we can track our findings there. This might somehow be expected
behavior but I will need to get some input from the virt team to confirm.

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.