nova volume-attach : Misleading error statement while attaching new volume to already existing device name.
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@
ERROR: The supplied device path (/dev/vda) is in use. (HTTP 400) (Request-ID: req-cd9f7e3b-
The command execution stream:
ubuntu@
+------
| ID | Status | Display Name | Size | Volume Type | Attached to |
+------
| 6dce0d3f-
| 84a05d96-
+------
ubuntu@
+------
| ID | Name | Status | Networks |
+------
| 504d4c91-
| b0626426-
+------
ubuntu@
ERROR: The supplied device path (/dev/vda) is in use. (HTTP 400) (Request-ID: req-cd9f7e3b-
ubuntu@
+------
| Property | Value |
+------
| device | /dev/vdd |
| serverId | 504d4c91-
| id | 84a05d96-
| volumeId | 84a05d96-
+------
ubuntu@
+------
| Property | Value |
+------
| status | in-use |
| display_name | None |
| attachments | [{u'device': u'/dev/vdc', u'server_id': u'504d4c91-
| availability_zone | nova |
| bootable | false |
| created_at | 2013-02-
| display_description | None |
| volume_type | None |
| snapshot_id | None |
| source_volid | None |
| size | 1 |
| id | 6dce0d3f-
| metadata | {} |
+------
ubuntu@
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.
With reference to command execution: devstack- 12:~/workspace$ nova volume-attach 504d4c91- ce15-4af2- a7b4-4b81d55d80 66 84a05d96- 734d-417b- bf31-11e2fbcb86 ae /dev/vdc 51be-4358- a2d2-bf01e40931 d9)
ubuntu@
ERROR: The supplied device path (/dev/vda) is in use. (HTTP 400) (Request-ID: req-cd9f7e3b-
>> 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.