121 Commits

Author SHA1 Message Date
Miguel Pires
3d10770db0 data: add soft dependency to time-set
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
2022-06-14 11:23:13 +01:00
Miguel Pires
f2df6b4d07 data: start snapd after time-set
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
2022-06-13 13:40:36 +01:00
Valentin David
7b8cc24fb9 snapd.recovery-chooser-trigger.service: Fix dependencies
Snapd does not need to wait for recovery-chooser-trigger to finished.
What needs to wait is console-conf, which is started after
`getty-pre.target`.
2022-05-11 15:25:22 +02:00
Dimitri John Ledkov
5f44956e01 data/systemd/snapd.service: start after socket
During boot, the initial transaction may contain both snapd.socket and
snapd.service at the same time. In such cases, snapd.service should be
started strictly after snapd.socket (After+Requires), instead of just
simultaniously with it (Requires alone).

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2022-01-24 15:51:11 +00:00
Ian Johnson
2168429f03 data/systemd/snapd.snap-repair.*: rm obsolete TODO:UC20's
We decided to have snap-repair run in recover mode, so this TODO is obsolete.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-02-23 16:43:41 -06:00
Dimitri John Ledkov
d08cb79dac If finalrd is available, do not run snapd.system-shutdown service.
finalrd is superior implementation, is available on core20 and is
being evaluated for backport to core18.
2020-04-14 13:26:32 +01:00
Maciej Borzecki
c62cc06989 data/systemd: make snapd.recovery-chooser-trigger.service depend on /dev/input
Make the recovery chooser trigger service depend on /dev/input being non-empty.
This will make systemd skip the service when there are no input devices.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-04-14 09:32:02 +02:00
Zygmunt Krynicki
533b519d6a data: snapd.apparmor.service requires mounts for
Add RequiresMountsFor= for the two directories snapd.apparmor.service
actually depends on, the location of the profiles and the location of
the cache.

This was always the case, but it slipped below our radar. This is now
relevant due to experimental ZFS support available in Ubuntu 20.04,
which puts /var/lib on a separate mount point that is not available on
early boot.

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
2020-04-09 20:26:49 +02:00
Ian Johnson
ef0179c52e snapd.core-fixup.sh: fix typo
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2020-03-17 10:59:01 -05:00
Ian Johnson
8d2a9ec00c Merge branch 'master' into tests/snapd-failover-mini-patch
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2020-02-26 09:34:14 -06:00
Sergio Schvezov
f5da3d3539 data/systemd: improve the description
While the code may have references to "snappy" we have long ago
not exposed that name. Fix the service description so that the
"Snappy" reference is not seen on system startup nor shutdown.

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
2020-02-26 08:51:51 -03:00
Ian Johnson
5989a80f45 Merge branch 'master' into tests/snapd-failover-full-patch-wip
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2020-02-25 14:40:19 -06:00
Maciej Borzecki
d1d2f9057c data/systemd/snapd.recovery-chooser-trigger.service: drop comments
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-02-25 10:41:46 +01:00
Ian Johnson
5fe2072b51 snapd.failure.service.in: don't set RemainAfterExit
This specifically will cause snapd.failure to kick in if 2 broken snapd's are
installed without a reboot or explicitly stopping the snapd.failure service so
that on the second time, snapd.failure will actually be started.

Because of this, it's no longer sufficient to check to see if the snapd.failure
service is active after a broken snapd is installed, we have to look at the logs
to see that it was actually activated/started more times after the broken snapd
was installed than before.

Also since it's always basically inactive, remove the restore section since
there's no point to stopping it now as it will always be inactive essentially.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2020-02-24 09:28:44 -06:00
Maciej Borzecki
84d4351bd2 data/systemd/snapd.recovery-chooser-trigger.service: add newline
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-02-24 15:26:08 +01:00
Maciej Borzecki
c1a4abd64c data/systemd/snapd.recovery-chooser-trigger: drop Restart
Restart policy is not supported for oneshot services.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-02-24 10:12:24 +01:00
Maciej Borzecki
581a6b4c3e data/systemd: tweak snapd.recovery-chooser-trigger, use oneshot type, leave notes
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-02-21 21:55:55 +01:00
Maciej Borzecki
379cfa27f8 data/systemd: snapd.check-chooser.service -> snapd.recovery-chooser-trigger.service
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-02-20 18:07:04 +01:00
Maciej Borzecki
2f22a1bb0a fixup! data/systemd: update snapd.check-chooser.service
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-02-20 17:19:36 +01:00
Maciej Borzecki
4396287054 data/systemd: update snapd.check-chooser.service
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-02-20 17:14:31 +01:00
Michael Vogt
ab72d56f58 snap-bootstrap: add check-chooser subcommand 2020-02-19 13:30:42 +01:00
Michael Vogt
0a94813747 Merge remote-tracking branch 'upstream/master' into core20-spread-3 2020-01-08 10:44:05 +01:00
Michael Vogt
7270ae274c data: enable snap-repair.timer on uc20 and add missing TODO:UC20: 2020-01-08 08:08:24 +01:00
Michael Vogt
0e2c436044 data: adjust systemd ConditionKernelCommandLine for UC20
The gadget snap for uc20 got updated recently and no longer
includes "snap_core=" in the kernel commandline. This means
that some of the services that are supposed to run on all
core devices do not run on UC20 today.

This PR updates the check so that snapd_recovery_mode is also
recognized as a valid ubuntu core commandline.
2020-01-07 08:54:25 +01:00
Michael Vogt
81c4b8e944 snapd.core-fixup.sh: do not run on UC20 2020-01-06 12:40:30 +01:00