refresh with layouts in both revisions fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Medium
|
Zygmunt Krynicki |
Bug Description
With one snap with layouts like this:
```
name: kubernetes-thing
version: "0.0.1"
summary: kubernetes things
description: things
base: core18
architectures:
- amd64
confinement: strict
grade: devel
layout:
/var/lib/kubelet:
bind: $SNAP_DATA/kubelet
/var/log:
bind: $SNAP_DATA/log
apps:
containerd:
command: snap/command-
daemon: simple
```
I can't refresh the snap if I have daemons or apps that ran and saved the mount ns, because snap-update-ns fails to run when refreshing. The specific error message with debug logs:
```
error: cannot perform the following tasks:
- Setup snap "kubernetes-thing" (unset) security profiles (cannot update mount namespace of snap "kubernetes-thing": cannot update preserved namespace of snap "kubernetes-thing":
-----
common.go:60: DEBUG: locking mount namespace of snap "kubernetes-thing"
common.go:81: DEBUG: freezing processes of snap "kubernetes-thing"
change.go:514: DEBUG: reusing synthetic entry "tmpfs /var/lib tmpfs x-snapd.
change.go:514: DEBUG: reusing synthetic entry "/var/lib/cloud /var/lib/cloud none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/
change.go:514: DEBUG: reusing synthetic entry "/var/lib/dbus /var/lib/dbus none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/dhcp /var/lib/dhcp none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/
change.go:514: DEBUG: reusing synthetic entry "/var/lib/misc /var/lib/misc none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/pam /var/lib/pam none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/polkit-1 /var/lib/polkit-1 none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/private /var/lib/private none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/python /var/lib/python none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/snapd /var/lib/snapd none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/sudo /var/lib/sudo none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/systemd /var/lib/systemd none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/ucf /var/lib/ucf none rbind,x-
change.go:514: DEBUG: reusing synthetic entry "/var/lib/vim /var/lib/vim none rbind,x-
change.go:529: DEBUG: desiredIDs: map[/var/log:true /var/lib/
change.go:530: DEBUG: reuse: map[/var/lib:true /var/lib/dhcp:true /var/lib/
change.go:353: DEBUG: mount --make-rprivate "/var/log" (error: <nil>)
change.go:363: DEBUG: umount "/var/log" UMOUNT_
change.go:408: DEBUG: remove "/var/log" (error: remove /var/log: read-only file system)
common.go:89: DEBUG: unlocking mount namespace of snap "kubernetes-thing"
common.go:91: DEBUG: thawing processes of snap "kubernetes-thing"
cannot update snap namespace: read-only file system
-----)
```
description: | updated |
Changed in snapd: | |
assignee: | nobody → Zygmunt Krynicki (zyga) |
Changed in snapd: | |
status: | New → Triaged |
Changed in snapd: | |
importance: | Undecided → Medium |
Which version of snapd was that? There was a fix for robust mount ns updates, but it's only in 2.42.3 and requires manual feature flag to be enabled: experimental. robust- mount-namespace -updates= true