← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1998083] Re: volume_attachement entries are not getting deleted from DB

 

I wasn't able to reproduce this problem on master branch + LVM driver.
The entries on the volume_attachment table are updating correctly. Looks
like the problem is fixed in master.

Steps I've tried:
1. Create a cirros server
2. Attach a LVM volume
3. Shelve the server
4. Unshelve the server

Let me know if this assumption is not correct but I think this involves
Nova scope and not Cinder. Because of that I'm moving this bug to Nova
for future assistance.

Thanks,
Cheers,
Sofia

** Project changed: cinder => nova

** No longer affects: cinder/wallaby

-- 
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/1998083

Title:
  volume_attachement entries are not getting deleted from DB

Status in OpenStack Compute (nova):
  New

Bug description:
  Hello
  I am using wallaby release openstack and having issues with cinder volumes as once I try to delete, resize or unshelve the shelved vms the volume_attachement entries do not get deleted in cinder db and therefore the above mentioned operations fail every time. I have to delete these volume_attachement entries manually to make it work.

  For e.g I shelved some instance via openstack horizon to reproduce the
  same scenario.

  Here are the detailed attachment entries you can see for the shelved
  instance.

  +--------------------------------------+--------------------------------------+--------------------------+--------------------------------------+---------------+-----------------------------------------│·

  --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  │·

  | id                                   | volume_id
  | attached_host            | instance_uuid                        |
  attach_status | connector                               │·

  |             │·

  +--------------------------------------+--------------------------------------+--------------------------+--------------------------------------+---------------+-----------------------------------------│·

  --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  │·

  | 8daddacc-8fc8-4d2b-a738-d05deb20049f |
  67ea3a39-78b8-4d04-a280-166acdc90b8a | nfv1compute43 |
  9266a2d7-9721-4994-a6b5-6b3290862dc6 | attached      | {"platform":
  "x86_64", "os_type": "linux│·

  ", "ip": "10.42.168.87", "host": "nfv1compute43", "multipath": false,
  "do_local_attach": false, "system uuid": "65917e4f-c8c4-a2af-
  ec11-fe353e13f4dd", "mountpoint": "/dev/vda"} |             │·

  | d3278543-4920-42b7-b217-0858e986fcce |
  67ea3a39-78b8-4d04-a280-166acdc90b8a | NULL                     |
  9266a2d7-9721-4994-a6b5-6b3290862dc6 | reserved      | NULL
  │·

  |             │·

  +--------------------------------------+--------------------------------------+--------------------------+--------------------------------------+---------------+-----------------------------------------│·

  --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  │·

  2 rows in set (0.00 sec)

  If I would like to unshelve this instance it wont work as it has a
  duplicate entry in cinder db for the attachment. So i have to delete
  it manually from db or via cli.

  root@master01:/home/hemant# cinder --os-volume-api-version 3.27
  attachment-list --all | grep 67ea3a39-78b8-4d04-a280-166acdc90b8a
  │·

  | 8daddacc-8fc8-4d2b-a738-d05deb20049f |
  67ea3a39-78b8-4d04-a280-166acdc90b8a | attached |
  9266a2d7-9721-4994-a6b5-6b3290862dc6 |
  │·

  | d3278543-4920-42b7-b217-0858e986fcce |
  67ea3a39-78b8-4d04-a280-166acdc90b8a | reserved |
  9266a2d7-9721-4994-a6b5-6b3290862dc6 |

  cinder --os-volume-api-version 3.27 attachment-delete
  8daddacc-8fc8-4d2b-a738-d05deb20049f

  I could only gather logs from nova-compute

  nova-compute logs:

  cinderclient.exceptions.ClientException: Unable to update
  attachment.(Invalid volume: duplicate connectors detected on volume

  This is the only choice I have if I would like to unshelve vm. But
  this is not a good approach for production env to delete duplicate
  volume attachments entries every time for every vm.

  Is there any way to fix this issue ?

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1998083/+subscriptions