unable to use /dev/disk/by-path for cc_disk_setup

Bug #1969518 reported by Brendan Germain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Low
Unassigned

Bug Description

fs_setup:
- device: /dev/disk/by-path/pci-0000:18:00.0-nvme-1

or

fs_setup:
- device: /dev/disk/by-path/pci-0000:18:00.0-nvme-1-part1

yields:

cc_disk_setup.py[WARNING]: Partition '0-nvme-1' from dotted device name '/dev/disk/by-path/pci-0000:18:00.0-nvme-1' overrides 'partition' key

cc_disk_setup.py[WARNING]: Partition '0-nvme-1-part1' from dotted device name '/dev/disk/by-path/pci-0000:18:00.0-nvme-1-part1' overrides 'partition' key

the dots in these device paths do not indicate a partition and it seems there is no way to disable the partition auto detection.

you should be able to use any of the /dev/disk/ paths. by-id by-partuuid by-path by-uuid

description: updated
Revision history for this message
Brendan Germain (bgermain1689) wrote (last edit ):

this does work when using a cloud-init version recent enough to leverage device_aliases at this commit https://github.com/canonical/cloud-init/commit/758acf976f2cb67a85411467fa5fca2ea17a2283 which i monkey patched, though i'm not sure using aliases should be a requirement to target these devices.

Revision history for this message
James Falcon (falcojr) wrote :

Given how we expect the <device>.<partition_num> format, this may be hard to fix in a way that won't cause other parsing issues. Either way, this could be more robust than it is. Since we already have solution/workaround using aliases, I'm triaging this as low priority.

Changed in cloud-init:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
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.