rbd volume disk device config has wrong scsi unit address since pike
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Cinder |
Undecided
|
Unassigned | ||
| OpenStack Compute (nova) |
High
|
Jay Pipes | ||
| Ocata |
High
|
Artom Lifshitz | ||
| Pike |
High
|
Artom Lifshitz | ||
| Queens |
High
|
Artom Lifshitz |
Bug Description
Yaml:
vol_omu:
type: OS::Heat:
properties:
count: 2
resource_def:
type: OS::Cinder::Volume
properties:
name: OMU-Volume
size: 22
OMU-0:
type: OS::Nova::Server
properties:
name: OMU-0
image: { get_param: ipxe_image_id }
flavor: { get_param: flavor_omu }
key_name: { get_param: key_name }
networks: { get_attr: [OMU_0_ports, port-map] }
block_
- { "boot_index": -1, "disk_bus": "scsi", "volume_id": { get_attr: [vol_omu, resource.0] } }
- { "boot_index": -1, "disk_bus": "scsi", "volume_id": { get_attr: [vol_omu, resource.1] } }
Related xml content for OpenStack Newton:
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source protocol='rbd' name='cinder-
<host name='172.168.42.3' port='6789'/>
<host name='172.168.42.4' port='6789'/>
<host name='172.168.42.5' port='6789'/>
</source>
<target dev='sda' bus='scsi'/>
<serial>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source protocol='rbd' name='cinder-
<host name='172.168.42.3' port='6789'/>
<host name='172.168.42.4' port='6789'/>
<host name='172.168.42.5' port='6789'/>
</source>
<target dev='sdb' bus='scsi'/>
<serial>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
Related xml content for OpenStack Pike:
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none' discard='unmap'/>
<auth username='cinder'>
<secret type='ceph' uuid='6c373d85-
</auth>
<source protocol='rbd' name='volumes/
<host name='192.168.1.29' port='6789'/>
<host name='192.168.1.30' port='6789'/>
<host name='192.168.1.31' port='6789'/>
</source>
<target dev='sda' bus='scsi'/>
<serial>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none' discard='unmap'/>
<auth username='cinder'>
<secret type='ceph' uuid='6c373d85-
</auth>
<source protocol='rbd' name='volumes/
<host name='192.168.1.29' port='6789'/>
<host name='192.168.1.30' port='6789'/>
<host name='192.168.1.31' port='6789'/>
</source>
<target dev='sdb' bus='scsi'/>
<serial>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
The problem happened on Pike.
Two disks have the same unit ID:
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
And error log:
qemu-kvm: -object secret,
Duplicate ID 'scsi0-
description: | updated |
affects: | openstack-community → cinder |
summary: |
- block_device_mapping_v2 cannot work with Pike + rbd volume disk device config has wrong scsi unit address since pike |
Changed in cinder: | |
status: | New → Invalid |
Changed in nova: | |
status: | New → Confirmed |
Sahid Orentino (sahid-ferdjaoui) wrote : | #2 |
I would say it's a configuration issue... but it's difficult to say, we perhaps have to fix something.
The problem is that you need to indicate that which SCSI model you want for your device.
Can you add the image property hw_scsi_
yafeng (yafeng) wrote : | #3 |
The image is a ipxe image, used to set some extra parameters and load boot program from volume.
If I remove "image: { get_param: ipxe_image_id }", and let the VM boot from volume, then ID is correct.
It means virtio-blk and virtio-scsi cannot exist together?
OMU-0:
type: OS::Nova::Server
properties:
name: OMU-0
flavor: { get_param: flavor_omu }
key_name: { get_param: key_name }
networks: { get_attr: [OMU_0_ports, port-map] }
block_
- { "boot_index": 0, "disk_bus": "scsi", "volume_id": { get_attr: [vol_omu, resource.0] } }
- { "boot_index": -1, "disk_bus": "scsi", "volume_id": { get_attr: [vol_omu, resource.1] } }
yafeng (yafeng) wrote : | #4 |
But why it can work on Newton?
yafeng (yafeng) wrote : | #5 |
I tried to add image property hw_scsi_
Boot from SAN device 0x81 failed: Exec format error(http://
Boot from SAN device 0x82 failed: Exec format error(http://
It seems ipxe cannot find the volume devices, because seabios only can detect the first device, ipxe image in this case?
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none' discard='ignore'/>
<source file='/
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none' discard='unmap'/>
<auth username='cinder'>
<secret type='ceph' uuid='6c373d85-
</auth>
<source protocol='rbd' name='volumes/
<host name='192.168.1.29' port='6789'/>
<host name='192.168.1.30' port='6789'/>
<host name='192.168.1.31' port='6789'/>
</source>
<target dev='sda' bus='scsi'/>
<
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none' discard='unmap'/>
<auth username='cinder'>
<secret type='ceph' uuid='6c373d85-
</auth>
<source protocol='rbd' name='volumes/
<host name='192.168.1.29' port='6789'/>
<host name='192.168.1.30' port='6789'/>
<host name='192.168.1.31' port='6789'/>
</source>
<target dev='sdb' bus='scsi'/>
<
<address type='drive' controller='0' bus='0' target='0' unit='2'/>
</disk>
Sahid Orentino (sahid-ferdjaoui) wrote : | #6 |
Jay is working on a patch which should fix your issue as-well.
Do you have the possibility to validate it?
yafeng (yafeng) wrote : | #7 |
OpenStack RPM packages are installed in my environment.
python-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
ansible-
python2-
openstack-
openstack-
openstack-
yafeng (yafeng) wrote : | #8 |
I found driver.py, driver.pyc and driver.pyo under the directory /usr/lib/
How can I apply the patch?
Matt Riedemann (mriedem) wrote : | #9 |
You can checkout whatever tag of code you're on (16.0.1):
1. git clone <url to nova repo>
2. git checkout 16.0.1
3. cherry pick jay's patch:
git fetch https:/
resolve any merge conflicts if there are any and commit those changes
4. Generate a patch:
git format-patch -1
That will give you a .patch file which you can then apply on your install directory where nova exists (you probably want to also delete those .pyo and .pyc files):
https:/
Changed in nova: | |
assignee: | nobody → melanie witt (melwitt) |
status: | Confirmed → In Progress |
Changed in nova: | |
assignee: | melanie witt (melwitt) → sahid (sahid-ferdjaoui) |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit 2616b384e642b6e
Author: Jay Pipes <email address hidden>
Date: Fri Jan 26 12:20:35 2018 -0500
only increment disk address unit for scsi devices
We were erroneously incrementing the disk address unit attribute for
non-scsi devices, which resulted in inconsistent disk device naming and
addresses when SCSI devices were used along with non-SCSI devices (like
configdrive devices).
Also, we ensure that we assign unit number 0 for the boot volume of a
boot-
Change-Id: Ia91e2f9c316e25
Co-authored-by: Mehdi Abaakouk <email address hidden>
Closes-bug: #1729584
Closes-bug: #1753394
Changed in nova: | |
status: | In Progress → Fix Released |
Fix proposed to branch: stable/queens
Review: https:/
Changed in nova: | |
assignee: | sahid (sahid-ferdjaoui) → Jay Pipes (jaypipes) |
Fix proposed to branch: stable/pike
Review: https:/
Fix proposed to branch: stable/ocata
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit f9c66434eea245a
Author: Jay Pipes <email address hidden>
Date: Fri Jan 26 12:20:35 2018 -0500
only increment disk address unit for scsi devices
We were erroneously incrementing the disk address unit attribute for
non-scsi devices, which resulted in inconsistent disk device naming and
addresses when SCSI devices were used along with non-SCSI devices (like
configdrive devices).
Also, we ensure that we assign unit number 0 for the boot volume of a
boot-
Change-Id: Ia91e2f9c316e25
Co-authored-by: Mehdi Abaakouk <email address hidden>
Closes-bug: #1729584
Closes-bug: #1753394
(cherry picked from commit 2616b384e642b6e
Changed in nova: | |
importance: | Undecided → High |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit b255e16bd93d989
Author: Jay Pipes <email address hidden>
Date: Fri Jan 26 12:20:35 2018 -0500
only increment disk address unit for scsi devices
We were erroneously incrementing the disk address unit attribute for
non-scsi devices, which resulted in inconsistent disk device naming and
addresses when SCSI devices were used along with non-SCSI devices (like
configdrive devices).
Also, we ensure that we assign unit number 0 for the boot volume of a
boot-
Co-authored-by: Mehdi Abaakouk <email address hidden>
Closes-bug: #1729584
Closes-bug: #1753394
Conflicts:
nova/
NOTE(artom) Conflicts in nova/tests/
because the surrounding _get_guest_
present in pike.
Change-Id: Ia91e2f9c316e25
(cherry picked from commit 2616b384e642b6e
(cherry picked from commit f9c66434eea245a
This issue was fixed in the openstack/nova 18.0.0.0b1 development milestone.
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit 1150d4a2af5b06c
Author: Jay Pipes <email address hidden>
Date: Fri Jan 26 12:20:35 2018 -0500
only increment disk address unit for scsi devices
We were erroneously incrementing the disk address unit attribute for
non-scsi devices, which resulted in inconsistent disk device naming and
addresses when SCSI devices were used along with non-SCSI devices (like
configdrive devices).
Also, we ensure that we assign unit number 0 for the boot volume of a
boot-
Co-authored-by: Mehdi Abaakouk <email address hidden>
Closes-bug: #1729584
Closes-bug: #1753394
Change-Id: Ia91e2f9c316e25
(cherry picked from commit 2616b384e642b6e
(cherry picked from commit f9c66434eea245a
(cherry picked from commit b255e16bd93d989
This issue was fixed in the openstack/nova 16.1.2 release.
This issue was fixed in the openstack/nova 17.0.3 release.
This issue was fixed in the openstack/nova 15.1.1 release.
Looks like https:/ /github. com/openstack/ nova/commit/ c25629f85feb53b 5be0347f68c43b3 b55fb9f137 in pike might have caused a regression.