Read-only interface for block devices
Bug #1837369 reported by
Alberto Donato
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi,
when running a rack controller, the MAAS snap needs to be able to read details about disks and partitions, to report details about system hardware and configuration.
Specifically, we run commands such as lsblk, udevadm, blockdev to get disk details, partition sizes and types.
Currently, we're using the "block-devices" interface, but this has some drawbacks:
1) it's more powerful than what we need, as we only need read-only access
2) it doesn't provide access to individual partitions for block devices
Would it be possible to have a "block-
Thanks
description: | updated |
Changed in snapd: | |
status: | Expired → New |
status: | New → Confirmed |
Changed in snapd: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
The 'block-devices' interface is meant for things like smartctl and hdparm (or flashing tools) to perform actions on raw disks. It says specifically: "Only allow raw disk devices; not loop, ram, CDROM, generic SCSI, network, tape, raid, etc devices or disk partitions"
So block-devices should not be extended to individual partitions.
hardware-observe is meant to allow lsblk and querying udevadm, have you tried that? /sbin/blockdev is not included in hardware-observe and would need to be added, but you might be able to use stage-packages in the meantime.