snapd 2.37.4+18.04 doesn't detect automount/autofs based NFS filesystems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Confirmed
|
Medium
|
Zygmunt Krynicki |
Bug Description
The snapd daemon attempts to determine if NFS filesystems are present using /etc/fstab and the mount list, according to the feature commit added here https:/
Unfortunately, in many real-world network login systems, network filesystems are managed by autofs/automount, so that in the case of networking being stalled or servers being down, the boot continues and the local system/users can still be used.
A small example:
/etc/auto.master
---
/home/remoteuser /etc/auto.home
---
/etc/auto.home
---
* -fstype=
---
What this looks like in mount:
---
/etc/auto.home on /home/remoteuser type autofs (rw,relatime,
---
Since no NFS filesystem is mounted, snapd starts up and does not enable NFS support:
---
> journalctl -u snapd
Mar 21 10:30:15 neuralabcws01 systemd[1]: Starting Snappy daemon...
Mar 21 10:30:15 neuralabcws01 snapd[1052]: AppArmor status: apparmor is enabled and all features are available
Mar 21 10:30:19 neuralabcws01 snapd[1052]: daemon.go:379: started snapd/2.37.4+18.04 (series 16; classic) neon/18.04 (amd64) linux/4.
Mar 21 10:30:39 neuralabcws01 systemd[1]: Started Snappy daemon.
---
If I then login an NFS user, and restart snapd
---
> journalctl -u snapd
Mar 21 10:33:39 neuralabcws01 systemd[1]: Starting Snappy daemon...
Mar 21 10:33:39 neuralabcws01 snapd[3446]: AppArmor status: apparmor is enabled and all features are available
Mar 21 10:33:39 neuralabcws01 snapd[3446]: backend.go:113: snapd enabled NFS support, additional implicit network permissions granted
Mar 21 10:33:42 neuralabcws01 snapd[3446]: daemon.go:379: started snapd/2.37.4+18.04 (series 16; classic) neon/18.04 (amd64) linux/4.
Mar 21 10:33:43 neuralabcws01 systemd[1]: Started Snappy daemon.
---
Changed in snapd: | |
status: | New → Confirmed |
assignee: | nobody → Zygmunt Krynicki (zyga) |
importance: | Undecided → Medium |
Autodetection of this would be nice, but a workaround that I can manually enable cleanly using my ansible provisioning would be fine as well, right now, based on https:/ /bugs.launchpad .net/ubuntu/ +source/ snapd/+ bug/1662552 I can fix this, but I expect this fix to be very fragile as I need to insert lines into config files that I suspect will be modified by future snapd upgrade.
A config.d directory where I can drop a config file to append permissions would be ideal.