[Bug 1349888] Re: [SRU] Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted.
** Tags removed: icehouse-backport-potential -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to nova in Ubuntu. https://bugs.launchpad.net/bugs/1349888 Title: [SRU] Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1349888/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1349888] Re: [SRU] Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted.
This bug was fixed in the package nova - 1:2014.1.5-0ubuntu1.3 --- nova (1:2014.1.5-0ubuntu1.3) trusty; urgency=medium * Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted. (LP: #1349888) - d/p/fix-creating-bdm-for-failed-volume-attachment.patch -- Edward Hope-MorleyTue, 08 Sep 2015 12:32:45 +0100 ** Changed in: nova (Ubuntu Trusty) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to nova in Ubuntu. https://bugs.launchpad.net/bugs/1349888 Title: [SRU] Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1349888/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1349888] Re: [SRU] Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted.
Deployed Trusty Icehouse with this nova version, ran the test described above and lgtm +1. ** Tags removed: verification-needed ** Tags added: verification-done -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to nova in Ubuntu. https://bugs.launchpad.net/bugs/1349888 Title: [SRU] Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1349888/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1349888] Re: [SRU] Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted.
Hello git-harry, or anyone else affected, Accepted nova into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nova/1:2014.1.5-0ubuntu1.3 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance! ** Changed in: nova (Ubuntu Trusty) Status: In Progress => Fix Committed ** Tags added: verification-needed -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to nova in Ubuntu. https://bugs.launchpad.net/bugs/1349888 Title: [SRU] Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1349888/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1349888] Re: [SRU] Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted.
** Description changed: + [Impact] + + * Ensure attching already attached volume to second instance does not +interfere with attached instance volume record. + + [Test Case] + + * Create cinder volume vol1 and two instances vm1 and vm2 + + * Attach vol1 to vm1 and check that attach was successful by doing: + +- cinder list +- nova show + +e.g. http://paste.ubuntu.com/12314443/ + + * Attach vol1 to vm2 and check that attach fails and, crucially, that the +first attach is unaffected (as above). You also check the Nova db as +follows: + +select * from block_device_mapping where source_type='volume' and \ +(instance_uuid='' or instance_uuid=''); + +from which you would expect e.g. http://paste.ubuntu.com/12314416/ which +shows that vol1 is attached to vm1 and vm2 attach failed. + + * finally detach vol1 from vm1 and ensure that it succeeds. + + [Regression Potential] + + * none + + + nova assumes there is only ever one bdm per volume. When an attach is initiated a new bdm is created, if the attach fails a bdm for the volume is deleted however it is not necessarily the one that was just created. The following steps show how a volume can get stuck detaching because of this. - $ nova list c+--++++-+--+ | ID | Name | Status | Task State | Power State | Networks | +--++++-+--+ | cb5188f8-3fe1-4461-8a9d-3902f7cc8296 | test13 | ACTIVE | - | Running | private=10.0.0.2 | +--++++-+--+ $ cinder list +--+---++--+-+--+-+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--+---++--+-+--+-+ | c1e38e93-d566-4c99-bfc3-42e77a428cc4 | available | test10 | 1 | lvm1 | false | | +--+---++--+-+--+-+ $ nova volume-attach test13 c1e38e93-d566-4c99-bfc3-42e77a428cc4 +--+--+ | Property | Value| +--+--+ | device | /dev/vdb | | id | c1e38e93-d566-4c99-bfc3-42e77a428cc4 | | serverId | cb5188f8-3fe1-4461-8a9d-3902f7cc8296 | | volumeId | c1e38e93-d566-4c99-bfc3-42e77a428cc4 | +--+--+ $ cinder list +--+++--+-+--+--+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--+++--+-+--+--+ | c1e38e93-d566-4c99-bfc3-42e77a428cc4 | in-use | test10 | 1 | lvm1 | false | cb5188f8-3fe1-4461-8a9d-3902f7cc8296 | +--+++--+-+--+--+ $ nova volume-attach test13 c1e38e93-d566-4c99-bfc3-42e77a428cc4 ERROR (BadRequest): Invalid volume: status must be 'available' (HTTP 400) (Request-ID: req-1fa34b54-25b5-4296-9134-b63321b0015d) $ nova volume-detach test13 c1e38e93-d566-4c99-bfc3-42e77a428cc4 $ cinder list +--+---++--+-+--+--+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--+---++--+-+--+--+ | c1e38e93-d566-4c99-bfc3-42e77a428cc4 | detaching | test10 | 1 | lvm1 | false | cb5188f8-3fe1-4461-8a9d-3902f7cc8296 | +--+---++--+-+--+--+ - - 2014-07-29 14:47:13.952 ERROR oslo.messaging.rpc.dispatcher [req-134dfd17-14da-4de0-93fc-5d8d7bbf65a5 admin admin] Exception during message handling: can't be decoded 2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last): 2014-07-29 14:47:13.952 31588 TRACE oslo.messaging.rpc.dispatcher File
[Bug 1349888] Re: [SRU] Attempting to attach the same volume multiple times can cause bdm record for existing attachment to be deleted.
** Changed in: nova (Ubuntu) Status: In Progress => Fix Released ** Description changed: [Impact] - * Ensure attching already attached volume to second instance does not -interfere with attached instance volume record. + * Ensure attching already attached volume to second instance does not + interfere with attached instance volume record. [Test Case] - * Create cinder volume vol1 and two instances vm1 and vm2 + * Create cinder volume vol1 and two instances vm1 and vm2 - * Attach vol1 to vm1 and check that attach was successful by doing: + * Attach vol1 to vm1 and check that attach was successful by doing: -- cinder list -- nova show + - cinder list + - nova show -e.g. http://paste.ubuntu.com/12314443/ + e.g. http://paste.ubuntu.com/12314443/ - * Attach vol1 to vm2 and check that attach fails and, crucially, that the -first attach is unaffected (as above). You also check the Nova db as -follows: + * Attach vol1 to vm2 and check that attach fails and, crucially, that the + first attach is unaffected (as above). You can also check the Nova db as + follows: -select * from block_device_mapping where source_type='volume' and \ -(instance_uuid='' or instance_uuid=''); + select * from block_device_mapping where source_type='volume' and \ + (instance_uuid='' or instance_uuid=''); -from which you would expect e.g. http://paste.ubuntu.com/12314416/ which -shows that vol1 is attached to vm1 and vm2 attach failed. + from which you would expect e.g. http://paste.ubuntu.com/12314416/ which + shows that vol1 is attached to vm1 and vm2 attach failed. - * finally detach vol1 from vm1 and ensure that it succeeds. + * finally detach vol1 from vm1 and ensure that it succeeds. [Regression Potential] - * none + * none nova assumes there is only ever one bdm per volume. When an attach is initiated a new bdm is created, if the attach fails a bdm for the volume is deleted however it is not necessarily the one that was just created. The following steps show how a volume can get stuck detaching because of this. $ nova list c+--++++-+--+ | ID | Name | Status | Task State | Power State | Networks | +--++++-+--+ | cb5188f8-3fe1-4461-8a9d-3902f7cc8296 | test13 | ACTIVE | - | Running | private=10.0.0.2 | +--++++-+--+ $ cinder list +--+---++--+-+--+-+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--+---++--+-+--+-+ | c1e38e93-d566-4c99-bfc3-42e77a428cc4 | available | test10 | 1 | lvm1 | false | | +--+---++--+-+--+-+ $ nova volume-attach test13 c1e38e93-d566-4c99-bfc3-42e77a428cc4 +--+--+ | Property | Value| +--+--+ | device | /dev/vdb | | id | c1e38e93-d566-4c99-bfc3-42e77a428cc4 | | serverId | cb5188f8-3fe1-4461-8a9d-3902f7cc8296 | | volumeId | c1e38e93-d566-4c99-bfc3-42e77a428cc4 | +--+--+ $ cinder list +--+++--+-+--+--+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--+++--+-+--+--+ | c1e38e93-d566-4c99-bfc3-42e77a428cc4 | in-use | test10 | 1 | lvm1 | false | cb5188f8-3fe1-4461-8a9d-3902f7cc8296 | +--+++--+-+--+--+ $ nova volume-attach test13 c1e38e93-d566-4c99-bfc3-42e77a428cc4 ERROR (BadRequest): Invalid volume: status must be 'available' (HTTP 400) (Request-ID: req-1fa34b54-25b5-4296-9134-b63321b0015d) $ nova volume-detach test13 c1e38e93-d566-4c99-bfc3-42e77a428cc4 $ cinder list +--+---++--+-+--+--+ | ID | Status