← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1785050] Re: Volume status changed from error to available

 

OK so nova and cinder are both at the queens release, which means when
you attach the volume to the server, the compute API should create a
volume attachment record on the given volume. If the volume is in
'error' status I'd expect that to fail like how the old volume reserve
action would fail for a volume in error status.

Looking at the cinder volume attachment create code, it should fail if
the volume isn't in 'available' or 'downloading' status:

https://github.com/openstack/cinder/blob/9bc9a528ef46522fd727a2a047da435c658a15c5/cinder/volume/api.py#L2084

It seems that this is the problem - because there is an instance_uuid,
override=True:

https://github.com/openstack/cinder/blob/9bc9a528ef46522fd727a2a047da435c658a15c5/cinder/volume/api.py#L2093

And then the volume statis us changed to reserved:

https://github.com/openstack/cinder/blob/9bc9a528ef46522fd727a2a047da435c658a15c5/cinder/volume/api.py#L2111

Then once the attach on the compute actually fails, we'd delete the
attachment from the nova side and the volume will be back in 'available'
status because it no longer has any attachments:

https://github.com/openstack/cinder/blob/9bc9a528ef46522fd727a2a047da435c658a15c5/cinder/volume/api.py#L2193

Compare that to how the volume "reserve" action works:

https://github.com/openstack/cinder/blob/9bc9a528ef46522fd727a2a047da435c658a15c5/cinder/volume/api.py#L690

If the volume isn't 'available' it will fail.

** Also affects: cinder
   Importance: Undecided
       Status: New

-- 
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:
  Triaged
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


References