← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2045746] [NEW] openstack server add volume -device can not assign a internal device name for volume

 

Public bug reported:

Jammy+ Yoga nova 3:25.2.0-0ubuntu1

Even though I specified the name as vdd, the device-mapping is still vdb

$ openstack server add volume d261479e-b840-4f62-8542-332e18e63692
9dc530f2-845e-43dd-b67c-1dbe779baa39 --device /dev/vdd

$ openstack volume show 9dc530f2-845e-43dd-b67c-1dbe779baa39 -fvalue -c
attachments

[{'id': '9dc530f2-845e-43dd-b67c-1dbe779baa39', 'attachment_id':
'00613632-90bb-450d-a7fd-daa424972c4e', 'volume_id':
'9dc530f2-845e-43dd-b67c-1dbe779baa39', 'server_id':
'd261479e-b840-4f62-8542-332e18e63692', 'host_name': 'juju-
fd7226-q2-11.cloud.sts', 'device': '/dev/vdb', 'attached_at':
'2023-12-06T06:45:40.000000'}]


$ virsh domblklist  1
 Target   Source
-----------------------------------------------------------------------------
 vda      /var/lib/nova/instances/d261479e-b840-4f62-8542-332e18e63692/disk
 vdb      cinder-ceph/volume-9dc530f2-845e-43dd-b67c-1dbe779baa39

nova-compute.log

2023-12-06 06:45:36.991 348863 INFO nova.virt.libvirt.driver
[req-37e0ba55-9246-486e-9483-dd2be3ba715d
fa7cf5da63d04a1b89bac811f36f1b71 0a46d2dc99dd4cd584910e0dfa704ad5 -
3c6c3936f8674130a25155cc22f8b78d 3c6c3936f8674130a25155cc22f8b78d]
[instance: d261479e-b840-4f62-8542-332e18e63692] Ignoring supplied
device name: /dev/vdd

2023-12-06 06:45:37.322 348863 INFO nova.compute.manager
[req-37e0ba55-9246-486e-9483-dd2be3ba715d
fa7cf5da63d04a1b89bac811f36f1b71 0a46d2dc99dd4cd584910e0dfa704ad5 -
3c6c3936f8674130a25155cc22f8b78d 3c6c3936f8674130a25155cc22f8b78d]
[instance: d261479e-b840-4f62-8542-332e18e63692] Attaching volume
9dc530f2-845e-43dd-b67c-1dbe779baa39 to /dev/vdb

In code [1] we can see that whatever name we specify is simply ignored, and the generated name is used.
Even the latest version of the code [2] is still the same. 

It seems that the current code doesn't support specifying a device name when attaching a volume. 
I'm not sure if it's true that all attached volumes can only be assigned an alphabetical device name inside the vm. 
Is there any other way to assign a device name inside the vm?

[1] https://github.com/openstack/nova/blob/stable/yoga/nova/virt/libvirt/driver.py#L12001-L12015
[2] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L12296-L12310

** Affects: nova
     Importance: Undecided
         Status: New

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

Title:
  openstack server add volume  -device can not assign a internal device
  name for volume

Status in OpenStack Compute (nova):
  New

Bug description:
  Jammy+ Yoga nova 3:25.2.0-0ubuntu1

  Even though I specified the name as vdd, the device-mapping is still
  vdb

  $ openstack server add volume d261479e-b840-4f62-8542-332e18e63692
  9dc530f2-845e-43dd-b67c-1dbe779baa39 --device /dev/vdd

  $ openstack volume show 9dc530f2-845e-43dd-b67c-1dbe779baa39 -fvalue
  -c attachments

  [{'id': '9dc530f2-845e-43dd-b67c-1dbe779baa39', 'attachment_id':
  '00613632-90bb-450d-a7fd-daa424972c4e', 'volume_id':
  '9dc530f2-845e-43dd-b67c-1dbe779baa39', 'server_id':
  'd261479e-b840-4f62-8542-332e18e63692', 'host_name': 'juju-
  fd7226-q2-11.cloud.sts', 'device': '/dev/vdb', 'attached_at':
  '2023-12-06T06:45:40.000000'}]

  
  $ virsh domblklist  1
   Target   Source
  -----------------------------------------------------------------------------
   vda      /var/lib/nova/instances/d261479e-b840-4f62-8542-332e18e63692/disk
   vdb      cinder-ceph/volume-9dc530f2-845e-43dd-b67c-1dbe779baa39

  nova-compute.log

  2023-12-06 06:45:36.991 348863 INFO nova.virt.libvirt.driver
  [req-37e0ba55-9246-486e-9483-dd2be3ba715d
  fa7cf5da63d04a1b89bac811f36f1b71 0a46d2dc99dd4cd584910e0dfa704ad5 -
  3c6c3936f8674130a25155cc22f8b78d 3c6c3936f8674130a25155cc22f8b78d]
  [instance: d261479e-b840-4f62-8542-332e18e63692] Ignoring supplied
  device name: /dev/vdd

  2023-12-06 06:45:37.322 348863 INFO nova.compute.manager
  [req-37e0ba55-9246-486e-9483-dd2be3ba715d
  fa7cf5da63d04a1b89bac811f36f1b71 0a46d2dc99dd4cd584910e0dfa704ad5 -
  3c6c3936f8674130a25155cc22f8b78d 3c6c3936f8674130a25155cc22f8b78d]
  [instance: d261479e-b840-4f62-8542-332e18e63692] Attaching volume
  9dc530f2-845e-43dd-b67c-1dbe779baa39 to /dev/vdb

  In code [1] we can see that whatever name we specify is simply ignored, and the generated name is used.
  Even the latest version of the code [2] is still the same. 

  It seems that the current code doesn't support specifying a device name when attaching a volume. 
  I'm not sure if it's true that all attached volumes can only be assigned an alphabetical device name inside the vm. 
  Is there any other way to assign a device name inside the vm?

  [1] https://github.com/openstack/nova/blob/stable/yoga/nova/virt/libvirt/driver.py#L12001-L12015
  [2] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L12296-L12310

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



Follow ups