nova volume-attach : Misleading error statement while attaching new volume to already existing device name.

Bug #1114985 reported by Roshan R Anvekar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

Description:
1. Create a volume A and attach to VM as device: /dev/vdc
2. Create another volume B and attach to VM as device: /dev/vdc

Expected: The error statement should be that "/dev/vdc is already inuse" for the VM.
Observation: Following error statement is issued:
ubuntu@devstack-12:~/workspace$ nova volume-attach 504d4c91-ce15-4af2-a7b4-4b81d55d8066 84a05d96-734d-417b-bf31-11e2fbcb86ae /dev/vdc
ERROR: The supplied device path (/dev/vda) is in use. (HTTP 400) (Request-ID: req-cd9f7e3b-51be-4358-a2d2-bf01e40931d9)

The command execution stream:
ubuntu@devstack-12:~/workspace$ nova volume-list
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| 6dce0d3f-dcb5-4827-81a8-91bcb335e677 | in-use | None | 1 | None | 504d4c91-ce15-4af2-a7b4-4b81d55d8066 |
| 84a05d96-734d-417b-bf31-11e2fbcb86ae | available | None | 2 | None | |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
ubuntu@devstack-12:~/workspace$ nova list
+--------------------------------------+--------+--------+--------------------------------+
| ID | Name | Status | Networks |
+--------------------------------------+--------+--------+--------------------------------+
| 504d4c91-ce15-4af2-a7b4-4b81d55d8066 | test02 | ACTIVE | private=10.0.0.3, 172.24.4.225 |
| b0626426-3f51-499e-aefc-baf92ae9223b | test3 | ACTIVE | private=10.0.0.2 |
+--------------------------------------+--------+--------+--------------------------------+
ubuntu@devstack-12:~/workspace$ nova volume-attach 504d4c91-ce15-4af2-a7b4-4b81d55d8066 84a05d96-734d-417b-bf31-11e2fbcb86ae /dev/vdc
ERROR: The supplied device path (/dev/vda) is in use. (HTTP 400) (Request-ID: req-cd9f7e3b-51be-4358-a2d2-bf01e40931d9)
ubuntu@devstack-12:~/workspace$ nova volume-attach 504d4c91-ce15-4af2-a7b4-4b81d55d8066 84a05d96-734d-417b-bf31-11e2fbcb86ae /dev/vdd
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdd |
| serverId | 504d4c91-ce15-4af2-a7b4-4b81d55d8066 |
| id | 84a05d96-734d-417b-bf31-11e2fbcb86ae |
| volumeId | 84a05d96-734d-417b-bf31-11e2fbcb86ae |
+----------+--------------------------------------+
ubuntu@devstack-12:~/workspace$ nova volume-show 6dce0d3f-dcb5-4827-81a8-91bcb335e677
+---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| status | in-use |
| display_name | None |
| attachments | [{u'device': u'/dev/vdc', u'server_id': u'504d4c91-ce15-4af2-a7b4-4b81d55d8066', u'id': u'6dce0d3f-dcb5-4827-81a8-91bcb335e677', u'volume_id': u'6dce0d3f-dcb5-4827-81a8-91bcb335e677'}] |
| availability_zone | nova |
| bootable | false |
| created_at | 2013-02-04T07:27:14.000000 |
| display_description | None |
| volume_type | None |
| snapshot_id | None |
| source_volid | None |
| size | 1 |
| id | 6dce0d3f-dcb5-4827-81a8-91bcb335e677 |
| metadata | {} |
+---------------------+--------------------------------------------------------- --------------------+
ubuntu@devstack-12:~/workspace$ !ssh
ssh -i openkey.pem cirros@172.24.4.225
$ sudo fdisk -l

Disk /dev/vda: 25 MB, 25165824 bytes
16 heads, 63 sectors/track, 48 cylinders, total 49152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/vda doesn't contain a valid partition table

Disk /dev/vdb: 1073 MB, 1073741824 bytes
16 heads, 63 sectors/track, 2080 cylinders, total 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/vdb doesn't contain a valid partition table

Disk /dev/vdc: 2147 MB, 2147483648 bytes
16 heads, 63 sectors/track, 4161 cylinders, total 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/vdc doesn't contain a valid partition table
$

VM type: m1.tiny -- which shows minimal 25MB root partition.
Seems like VM is skipping considering the root partition as device.

Revision history for this message
Roshan R Anvekar (roshan-anvekar) wrote :

With reference to command execution:
ubuntu@devstack-12:~/workspace$ nova volume-attach 504d4c91-ce15-4af2-a7b4-4b81d55d8066 84a05d96-734d-417b-bf31-11e2fbcb86ae /dev/vdc
ERROR: The supplied device path (/dev/vda) is in use. (HTTP 400) (Request-ID: req-cd9f7e3b-51be-4358-a2d2-bf01e40931d9)

>> I would expect the command to say : " The supplied device path (/dev/vdb) is in use."
But it is pointing out to the wrong device altogether : /dev/vda ( With my assumption that vda is root partition and vdb is attached partition )
Even if internally the VM uses different device name, I would expect it to point to attached volume in error statement rather then to root partition. So I see a mapping error here which I guess is different from the Duplicate bug mentioned.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.