Additional block devices cannot be attached when libvirt driver is virtio-scsi

Bug #1699228 reported by J-P methot
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Medium
Unassigned

Bug Description

Description
===========

This bug is very specific as it will only affect instances using the virtio-scsi driver that were booted up with a cinder block device.

Once your VM is booted up, attaching a drive will make the following error appear in the nova-compute log: "libvirtError: internal error: unable to execute QEMU command '__com.redhat_drive_add': Duplicate ID 'drive-scsi0-0-0-0' for drive"

This bug seems to affect most storage backends, as long as you use cinder for all your block devices. It was tested with Ceph and iscsi backends in both Mitaka and Newton.

It may also affect config drives.

Steps to reproduce
==================
1. Assign the necessary options to the image you are going to use, so that libvirt uses the virtio-scsi driver

hw_scsi_model = virtio-scsi
hw_disk_bus = scsi

2. Create a VM by selecting to use "image" as a source and set "create a new volume" to yes. This will boot from a new volume created in cinder with the selected image on it.

3.Create a new volume in cinder and try to attach it to the instance.

Expected result
===============
The volume will attach itself to the instance.

Actual result
=============
The attach operation will fail and you will see the aforementioned error in the nova-compute logs.

Environment
===========
CentOS 7
RDO Newton
openstack-nova-compute-14.0.6-1.el7.noarch
KVM libvirt

rpm -qa | grep "qemu\|libvirt"
libvirt-daemon-config-network-2.0.0-10.el7_3.9.x86_64
libvirt-python-2.0.0-2.el7.x86_64
qemu-img-ev-2.6.0-28.el7_3.9.1.x86_64
libvirt-daemon-driver-network-2.0.0-10.el7_3.9.x86_64
libvirt-daemon-driver-lxc-2.0.0-10.el7_3.9.x86_64
qemu-kvm-ev-2.6.0-28.el7_3.9.1.x86_64
centos-release-qemu-ev-1.0-1.el7.noarch
libvirt-daemon-2.0.0-10.el7_3.9.x86_64
libvirt-daemon-driver-qemu-2.0.0-10.el7_3.9.x86_64
ipxe-roms-qemu-20160127-5.git6366fa7a.el7.noarch
libvirt-daemon-kvm-2.0.0-10.el7_3.9.x86_64
libvirt-2.0.0-10.el7_3.9.x86_64
libvirt-client-2.0.0-10.el7_3.9.x86_64
libvirt-daemon-driver-nwfilter-2.0.0-10.el7_3.9.x86_64
libvirt-daemon-driver-nodedev-2.0.0-10.el7_3.9.x86_64
libvirt-daemon-config-nwfilter-2.0.0-10.el7_3.9.x86_64
libvirt-daemon-driver-storage-2.0.0-10.el7_3.9.x86_64
libvirt-daemon-driver-interface-2.0.0-10.el7_3.9.x86_64
qemu-kvm-common-ev-2.6.0-28.el7_3.9.1.x86_64
libvirt-daemon-driver-secret-2.0.0-10.el7_3.9.x86_64

Storage: Dell iscsi but also confirmed to be present on Ceph
Network: Neutron + openvswitch

Logs & config
=====
See logs and config in attached txt file

Revision history for this message
J-P methot (jphilippemethot) wrote :
description: updated
Revision history for this message
George (lmihaiescu) wrote :

Confirmed same problem on Mitaka running on Ubuntu 16.04 with Ceph as a backend for Cinder.

Jay Pipes (jaypipes)
summary: - Additionnal block devices cannot be attached when libvirt driver is
+ Additional block devices cannot be attached when libvirt driver is
virtio-scsi
Revision history for this message
Jay Pipes (jaypipes) wrote :

@lmihaiescu: Any chance you could post your exact log output so we can compare?

Revision history for this message
Sean Dague (sdague) wrote :

Automatically discovered version newton in description. If this is incorrect, please update the description to include 'nova version: ...'

tags: added: openstack-version.newton
Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Lee Yarwood (lyarwood) wrote :

I think Sahid is potentially fixing this as part of bug #1686116 and the following change https://review.openstack.org/#/c/459741/ correctly setting the unit in get_config for scsi volumes. I'll attempt to confirm this now.

Revision history for this message
Vladyslav Drok (vdrok) wrote :

Applying the chain up to https://review.openstack.org/#/c/459741/ seems to fix the issue for me

Revision history for this message
Lee Yarwood (lyarwood) wrote :

I've marked this as a duplicate of bug #1686116, if this is still required for Newton then please request a stable backport 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.