Reviewed: https://review.openstack.org/590037 Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=9c0123eb70b0928786d81469cc3ccbd4f30f38fe Submitter: Zuul Branch: master
commit 9c0123eb70b0928786d81469cc3ccbd4f30f38fe Author: Matt Riedemann <[email protected]> Date: Wed Aug 8 16:44:33 2018 -0400 Fix _attachment_reserve to not allow attaching an invalid status volume It is currently possible to create a volume attachment for a server when the volume is in error status because of the override logic in the _attachment_reserve method. What results is that the volume attach operation fails in nova-compute which rolls back and deletes the volume attachment, which puts the volume into 'available' status because it no longer has any attachments, which in fact it should have never allowed the attachment create/reserve in the first place. This updates the override logic such that a volume without any attachments which is in an invalid status will result in an error being raised. Change-Id: Id9cf2f510684cd296ffbcaf53d11889cfe8973b9 Closes-Bug: #1785050 ** Changed in: cinder Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1785050 Title: Volume status changed from error to available Status in Cinder: Fix Released Status in OpenStack Compute (nova): Invalid Bug description: Description =========== After creating a volume which resulted with status = "error", an attempt to attach the volume to VM will fail and will change the volume status to - "available". Steps to reproduce ================== 1. Create volume with status = "error". 2. Try to attach the volume to the VM. 3. Check the volume status. Expected result =============== 1. Volume will be created with status = "error". 2. Attachment to VM will failed. 3. Volume status will be - "error" Actual result ============= 1. Volume created in status = "error". 2. Attachment attempt to VM will fail. 3. Volume status changed from "error" to "available". Environment =========== [stack@undercloud~(tm5)]$ openstack --version openstack 3.14.2 [stack@undercloud~(tm5)]$ rpm -qa --last | grep nova openstack-nova-scheduler-17.0.6-0.20180704141006.3163c93.el7.noarch Mon 09 Jul 2018 07:38:21 PM UTC openstack-nova-placement-api-17.0.6-0.20180704141006.3163c93.el7.noarch Mon 09 Jul 2018 07:38:21 PM UTC openstack-nova-conductor-17.0.6-0.20180704141006.3163c93.el7.noarch Mon 09 Jul 2018 07:38:21 PM UTC openstack-nova-api-17.0.6-0.20180704141006.3163c93.el7.noarch Mon 09 Jul 2018 07:38:21 PM UTC openstack-nova-compute-17.0.6-0.20180704141006.3163c93.el7.noarch Mon 09 Jul 2018 07:38:20 PM UTC python-nova-17.0.6-0.20180704141006.3163c93.el7.noarch Mon 09 Jul 2018 07:38:18 PM UTC openstack-nova-common-17.0.6-0.20180704141006.3163c93.el7.noarch Mon 09 Jul 2018 07:38:18 PM UTC python2-novaclient-10.1.0-0.20180605113302.ed73aad.el7.noarch Mon 09 Jul 2018 07:37:49 PM UTC puppet-nova-12.4.1-0.20180617130812.b5284f1.el7.noarch Mon 09 Jul 2018 07:33:17 PM UTC [stack@undercloud~(tm5)]$ [stack@undercloud~(tm5)]$ rpm -qa --last | grep cinder python2-cinderclient-3.5.0-0.20180211213738.1de605c.el7.centos.noarch Mon 09 Jul 2018 07:37:49 PM UTC puppet-cinder-12.4.1-0.20180628102250.641e036.el7.noarch Mon 09 Jul 2018 07:33:17 PM UTC [stack@undercloud~(tm5)]$ [stack@undercloud~(tm5)]$ sudo dmidecode | egrep -i 'manufacturer|product|vendor' Vendor: Seabios Manufacturer: Red Hat Product Name: KVM Manufacturer: Bochs Storage: ceph version 12.2.4 To manage notifications about this bug go to: https://bugs.launchpad.net/cinder/+bug/1785050/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

