yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #28926
[Bug 1427060] [NEW] Unnecessary bdm entry is created if same volume is attached twice to an instance
Public bug reported:
When we try to attach an already attached volume to an instance it
raises InvalidVolume exception but creates an entry in
block_device_mapping table with deleted flag set to true. Ideally when
attach volume fails it should not create any entries in database.
Steps to reproduce:
1. Created an instance named test_vm_1.
2. Created a volume named test_volume_1.
3. Verified that instance is in active state and volume is in available state.
4. Attach volume using below command:
$ nova volume-attach <instance_id> <volume_id>.
5. Confirmed that volume is in 'in-use' status using below command:
$ cinder list.
6. Execute volume-attach command again with same volume_id.
$ nova volume-attach <instance_id> <volume_id>.
After executing step 6 it raises "Invalid volume" exception and attached volume can be used normally which is correct. But when you check block_device_mapping table using below sql query, you will find an additional bdm entry which should not be created.
select * from block_device_mapping where instance_uuid='ee94830b-
5d39-42a7-b8c2-6175bb77563a';
** Affects: nova
Importance: Undecided
Status: New
** Tags: ntt
--
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/1427060
Title:
Unnecessary bdm entry is created if same volume is attached twice to
an instance
Status in OpenStack Compute (Nova):
New
Bug description:
When we try to attach an already attached volume to an instance it
raises InvalidVolume exception but creates an entry in
block_device_mapping table with deleted flag set to true. Ideally when
attach volume fails it should not create any entries in database.
Steps to reproduce:
1. Created an instance named test_vm_1.
2. Created a volume named test_volume_1.
3. Verified that instance is in active state and volume is in available state.
4. Attach volume using below command:
$ nova volume-attach <instance_id> <volume_id>.
5. Confirmed that volume is in 'in-use' status using below command:
$ cinder list.
6. Execute volume-attach command again with same volume_id.
$ nova volume-attach <instance_id> <volume_id>.
After executing step 6 it raises "Invalid volume" exception and attached volume can be used normally which is correct. But when you check block_device_mapping table using below sql query, you will find an additional bdm entry which should not be created.
select * from block_device_mapping where instance_uuid='ee94830b-
5d39-42a7-b8c2-6175bb77563a';
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1427060/+subscriptions
Follow ups
References