~snappy-dev/snapd/+git/snapd-pawel:test-snapctl-is-connected-error

Last commit made on 2020-08-21
Get this branch:
git clone -b test-snapctl-is-connected-error https://git.launchpad.net/~snappy-dev/snapd/+git/snapd-pawel

Branch merges

Branch information

Name:
test-snapctl-is-connected-error
Repository:
lp:~snappy-dev/snapd/+git/snapd-pawel

Recent commits

1f55265... by Michael Vogt

Merge remote-tracking branch 'upstream/master' into test-snapctl-is-connected-error

4de07c0... by Sergio Cazzolato

Merge pull request #9187 from anonymouse64/bugfix/nested-better-loop-dev-detection

tests/lib/nested.sh: use more robust code for finding what loop dev we mounted

5a022d7... by Zygmunt Krynicki

Merge pull request #9159 from zyga/fix/lp-1891371

cmd/snap-update-ns: detach all bind-mounted file

f6c194b... by Ian Johnson

Merge branch 'master' into bugfix/nested-better-loop-dev-detection
Signed-off-by: Ian Johnson <email address hidden>

b1a5431... by Zygmunt Krynicki

Merge pull request #9189 from zyga/feature/snap-real-home

snap/snapenv: set SNAP_REAL_HOME

1d86138... by Zygmunt Krynicki

cmd/snap-update-ns: detach all bind-mounted file

When a mount namespace update, coupled with robust mount namespace
update option occurs, a mount namespace is torn down and re-constructed,
at least to the extent possible with snap-update-ns and the mount
profiles.

During the tear-down operation, snap-update-ns computes a set of mount
changes to perform, based on the currently applied mount profile. Those
actions are in general, the "undo" of the profile, so when something is
mounted, it gets unmounted during the undo process.

Some things are handled specially, as we've learned over time that the
extreme popularity of layouts and content has allowed for interesting
interactions that were not originally envisioned when designing the
mount/layout system. One such realization was that we can and should
detach bind-mounted directories as they can internally hold other mount
points due to how mount events propagate.

Today we realized that we need to detach bind-mounted files as well, as
a file that is open via file descriptor _or_ mapped as a section into a
process by the dynamic linker, can keep a file busy. In effect a file
that is busy this way cannot be unmounted.

There's an interesting interaction between layouts and content
connections. When a snap application, for example a service, is running
while content snap connection is established, the mount namespace may
not tear don correctly when such service (or any application really)
keeps a file open either via linker mapping or via an open file
descriptor.

Fixes: https://bugs.launchpad.net/snapd/+bug/1891371
Signed-off-by: Zygmunt Krynicki <email address hidden>

37d0a22... by Zygmunt Krynicki

snap/snapenv: set SNAP_REAL_HOME

The SNAP_REAL_HOME environment variable contains the vanilla home
directory before snapd-induced remapping. This is useful for several
reasons and might allow various helpers to use less guesses.

Signed-off-by: Zygmunt Krynicki <email address hidden>

2cb660a... by Zygmunt Krynicki

Merge pull request #9184 from mvo5/lxd-test-fail-2

packaging: umount /snap on purge in containers

fba407b... by Michael Vogt

Merge pull request #9188 from jdstrand/policy-updates-xlvi

interfaces: misc policy updates xlvi

6acdd72... by Michael Vogt

Merge pull request #9081 from anonymouse64/feature/cross-check-mount-partitions-3.5

 secboot,cmd/snap-bootstrap: cross-check partitions before unlocking, mounting