-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interfaces/builtin/mount_control: add support for nfs mounts (#14694)
* interfaces/builtin/mount_control: add support for nfs mounts Extend the mount-control interface with support for nfs mounts. The nfs entries cannot specify any other filesystem types, nor contain the 'what' attribute. Signed-off-by: Maciej Borzecki <[email protected]> * tests/lib/snaps/store/test-snapd-mount-control-nfs: add test snap Add snap for testing mount-control with NFS Signed-off-by: Maciej Borzecki <[email protected]> * tests/main/interfaces-mount-control-nfs: spread test Signed-off-by: Maciej Borzecki <[email protected]> * overlord/hookstate: support for mount-control with nfs Add support for performing NFS mounts through `snapctl mount` command. Signed-off-by: Maciej Borzecki <[email protected]> * interfaces/builtin/mount-control: improve validation and doc comments for nfs and tmpfs Signed-off-by: Maciej Borzecki <[email protected]> * interfaces/builtin: complain about the first occurrence of an exclusive FS type during validation Signed-off-by: Maciej Borzecki <[email protected]> * interfaces/builtin/mount_control: drop nfs4 The explicit 'nfs4' filesystem is deprecated and mounts should use the 'nfs' type which defaults to NFSv4 and supports all required options for handling NFSv3 and NFSv4. Signed-off-by: Maciej Borzecki <[email protected]> * interfaces/builtin/mount_control: improve coverage of validation code Signed-off-by: Maciej Borzecki <[email protected]> * tests/lib/snaps/store/test-snapd-mount-control-nfs: tweak snapcraft Signed-off-by: Maciej Borzecki <[email protected]> * tests/main/interfaces-mount-control-nfs: improve cleanup Signed-off-by: Maciej Borzecki <[email protected]> * interfaces/builtin: comment tweak Signed-off-by: Maciej Borzecki <[email protected]> * interfaces/builtin/mount_control: naming tweak Signed-off-by: Maciej Borzecki <[email protected]> * interfaces/builtin/mount_control: consider nfs4 to be deprecated Signed-off-by: Maciej Borzecki <[email protected]> * tests/main/interfaces-mount-control-nfs: enable Ubuntu 22.04, better retry Signed-off-by: Maciej Borzecki <[email protected]> --------- Signed-off-by: Maciej Borzecki <[email protected]>
- Loading branch information
Showing
9 changed files
with
307 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
PS1='$ ' | ||
|
||
exec "$@" |
34 changes: 34 additions & 0 deletions
34
tests/lib/snaps/store/test-snapd-mount-control-nfs/snapcraft.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: test-snapd-mount-control-nfs | ||
summary: Snap for testing mount-control with NFS | ||
description: Snap for testing mount-control with NFS | ||
version: "1.0" | ||
base: core22 | ||
confinement: strict | ||
|
||
apps: | ||
cmd: | ||
command: bin/cmd | ||
plugs: | ||
- mntctl | ||
- network | ||
- removable-media | ||
|
||
plugs: | ||
mntctl: | ||
interface: mount-control | ||
mount: | ||
- type: [nfs] | ||
where: /media/** | ||
options: [rw] | ||
|
||
parts: | ||
apps: | ||
plugin: dump | ||
source: . | ||
|
||
network-shares: | ||
plugin: nil | ||
stage-packages: | ||
- nfs-common | ||
stage: | ||
- -lib/systemd/system/nfs-common.service |
Oops, something went wrong.