Skip to content

Commit

Permalink
interfaces: allow loopback as a block-device
Browse files Browse the repository at this point in the history
Allowing loopback devices in the block-devices interface would be
convenient for testing and proof-of-concept setups for users of
snaps that consume block devices such as MicroCeph

Use case 1: allow a snap to utilize a preconfigured loopback bdev, for
instance allow MicroCeph to use a loopback device as an OSD for
testing or other non-performance critical work

Use case 2: allow a snap to create a loopback device automatically;
e.g. for the above scenario MicroCeph could automatically set up a
loop bdev for use as an OSD

Signed-off-by: Peter Sabaini <peter.sabaini@canonical.com>
  • Loading branch information
sabaini committed May 16, 2023
1 parent 4998110 commit 50158c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions interfaces/builtin/block_devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ const blockDevicesConnectedPlugAppArmor = `
/dev/i2o/hdd[a-x] rwk, # I2O hard disk continued
/dev/mmcblk[0-9]{,[0-9],[0-9][0-9]} rwk, # MMC (up to 1000 devices)
/dev/vd[a-z] rwk, # virtio
/dev/loop[0-9]{,[0-9],[0-9][0-9]} rwk, # loopback (up to 1000 devices)
/dev/loop-control rw, # loopback control
# Allow /dev/nvmeXnY namespace block devices. Please note this grants access to all
# NVMe namespace block devices and that the numeric suffix on the character device
Expand Down

0 comments on commit 50158c4

Please sign in to comment.