Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2124828

Summary: hw_disk_bus='sata' is replaced to scsi when it is attached to additional disk.
Product: Red Hat OpenStack Reporter: youngcheol <yocha>
Component: openstack-novaAssignee: OSP DFG:Compute <osp-dfg-compute>
Status: CLOSED MIGRATED QA Contact: OSP DFG:Compute <osp-dfg-compute>
Severity: low Docs Contact:
Priority: low    
Version: 16.2 (Train)CC: alifshit, dasmith, eglynn, jhakimra, kchamart, sbauza, sgordon, smooney, vromanso
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-17 14:31:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description youngcheol 2022-09-07 08:18:18 UTC
Description of problem:
hw_disk_bus='sata' is replaced to scsi when it is attached to addtional disk.

Version-Release number of selected component (if applicable):
RHOSP16.2

How reproducible:
luanch a VM from a volume form image that set hw_disk_bus=sata and attach addtional volume with set hw_disk_bus=sata.

Steps to Reproduce:

scenario issue occured :

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>

  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='network' device='disk'>
      <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
      <auth username='openstack'>
        <secret type='ceph' uuid='7564c59a-e6e4-4479-beca-fcdff96745af'/>
      </auth>
      <source protocol='rbd' name='volumes/volume-1204e3e1-d1ef-47de-bfe1-11d30bf52473' index='1'>
        <host name='172.16.1.28' port='6789'/>
      </source>
      <target dev='sda' bus='sata'/>					###<<<< sata
      <serial>1204e3e1-d1ef-47de-bfe1-11d30bf52473</serial>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='network' device='disk'>
      <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
      <auth username='openstack'>
        <secret type='ceph' uuid='7564c59a-e6e4-4479-beca-fcdff96745af'/>
      </auth>
      <source protocol='rbd' name='volumes/volume-ea6f7b80-4aa1-4150-a5d1-d3818b8011ba' index='2'>
        <host name='172.16.1.28' port='6789'/>
      </source>
      <target dev='sdb' bus='scsi'/> 					###<<<< scsi
      <serial>ea6f7b80-4aa1-4150-a5d1-d3818b8011ba</serial>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>



scenario issue not occured:
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. create a volume from image1 
3. create a second volume from image2 
4. launch VM with volumes like
$nova boot --flavor <flavor-name>  --nic net-name=<net> --block-device source=volume,id=<uuid>,dest=volume,bootindex=0 --block-device source=volume,id=<uuid>,dest=volume,bootindex=1 <vm_name> 

  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='network' device='disk'>
      <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
      <auth username='openstack'>
        <secret type='ceph' uuid='7564c59a-e6e4-4479-beca-fcdff96745af'/>
      </auth>
      <source protocol='rbd' name='volumes/volume-ccee1b14-f334-4709-b51e-aaa8ed6567d1' index='2'>
        <host name='172.16.1.28' port='6789'/>
      </source>
      <target dev='sda' bus='sata'/>					###<<<< sata
      <serial>ccee1b14-f334-4709-b51e-aaa8ed6567d1</serial>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='network' device='disk'>
      <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
      <auth username='openstack'>
        <secret type='ceph' uuid='7564c59a-e6e4-4479-beca-fcdff96745af'/>
      </auth>
      <source protocol='rbd' name='volumes/volume-5ffb9a96-9a0a-4a33-a99e-ae9fa638275d' index='1'>
        <host name='172.16.1.28' port='6789'/>
      </source>
      <target dev='sdb' bus='sata'/>					###<<<< sata
      <serial>5ffb9a96-9a0a-4a33-a99e-ae9fa638275d</serial>
      <alias name='sata0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>


Actual results:
attached volume  should be set bus='sata' in xml

Expected results:
attached volume  should be set  bus='scsi' in xml

Additional info:
I'll put a private note.

Comment 4 Artom Lifshitz 2023-06-01 17:59:53 UTC
Going to close this as WONTFIX, because we don't have the runway left for 16.2 to start, review, finish, then backport a fix. LP bug has been filed upstream, work can continue there.

Comment 7 smooney 2024-06-06 12:31:51 UTC
*** Bug 2283088 has been marked as a duplicate of this bug. ***