Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
switch /etc/systemd/system to "synced" mode #17
Conversation
|
Why are we making this change? |
|
i would have expected the PR description to be explanatory enough :) when a new systemd unit shows up in the squashfs it will not end up in /writable (and thus stay invisible to the system) when "transition" mode is used since transition only copies the dir contents once at first mount of a device. "synced" means all files from the squashfs that do not exist at the destination get copied at every boot, so new files that get added to the squashfs will show up. |
|
note that the same fix should be applied for snapcore/snapd#3807 ... the issue is identical ... |
| @@ -72,7 +72,7 @@ | ||
| /etc/network/if-up.d auto persistent transition none | ||
| /etc/NetworkManager/system-connections auto persistent none none | ||
| # snappy security policy, etc | ||
| -/var/lib/snapd auto persistent transition none | ||
| +/var/lib/snapd auto synced none none |
ogra1
Sep 7, 2017
Contributor
nope, the former "persistent" was wrongly indented (the file uses spaces for indentation) ...
| @@ -109,4 +109,6 @@ | ||
| /etc/default/swapfile auto persistent transition none | ||
| # allow system wide proxy setting | ||
| /etc/environment auto persistent transition none | ||
| +# https://github.com/snapcore/snapd/pull/3866 | ||
| +/var/cache/snapd auto synced none none |
ogra1
Sep 8, 2017
Contributor
I dont think there will be anything in the squashfs initially ... @chipaca can probably elaborate why "synced" should be used...
ogra1
Sep 8, 2017
•
Contributor
you are aware that caches with the same filename in both places will not be synced i assume ?
(so if you seed them later, the generated ones will stay and override)
chipaca
Sep 8, 2017
Member
that's exactly the behaviour I want, yes, thank you.
We're leaving ourselves the option of shipping a default cache that would be used if the snapd on the device doesn't get network for a while, say. E.g. if it's only rarely online and has been updated out-of-band.
If the file exists it'll probably be fresher / better than the seeded one.
ogra1 commentedAug 31, 2017
http://manpages.ubuntu.com/manpages/xenial/man5/writable-paths.5.html
synced:
[ Any file appearing in the root filesystem will also be copied
over to writable storage. However file removals are still not
synced and files existing in both read-only and writeable
storage will not be updated. ]...
transition:
[ ...note that subsequent boots
will ignore any new files appearing or disappearing in the
original read-only rootfs location unless you perform a
factory reset. ]...