-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #298 from endlessm/T5658-ostree-staged-deployment
apply: Use staged deployment on booted systems
- Loading branch information
Showing
7 changed files
with
127 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[Unit] | ||
Description=Automatically cleanup after staged Endless OS Updater deployment | ||
Documentation=man:ostree-admin-cleanup(1) man:eos-updater(8) | ||
|
||
# Run ostree admin cleanup only if /sysroot/.cleanup is present and then | ||
# delete it when cleanup is successful. | ||
# | ||
# FIXME: Drop this when https://github.com/ostreedev/ostree/issues/2510 | ||
# is resolved. | ||
ConditionPathExists=/sysroot/.cleanup | ||
|
||
# We want this to be triggered by multi-user.target but not block it via | ||
# the default After added to target units since pruning the repo can be | ||
# slow. See the Default Dependencies sections in systemd.service(5) and | ||
# systemd.target(5). | ||
DefaultDependencies=no | ||
Requires=sysinit.target | ||
After=sysinit.target basic.target | ||
Conflicts=shutdown.target | ||
Before=shutdown.target | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=@ostree@ admin cleanup | ||
ExecStart=/bin/rm -f /sysroot/.cleanup | ||
|
||
# Only /sysroot and /boot need to be written to. | ||
ProtectSystem=strict | ||
ReadWritePaths=/sysroot /boot | ||
|
||
# This will be allowed to run in the background, so try to make it less | ||
# disruptive while it prunes the repo. | ||
IOSchedulingClass=idle | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This is a drop-in file for ostree-finalize-staged.service. | ||
# | ||
# FIXME: Drop this when https://github.com/ostreedev/ostree/issues/2510 | ||
# is resolved. | ||
|
||
[Service] | ||
# After finalizing the staged deployment, touch the .cleanup file so | ||
# that the cleanup can be completed on the next boot. | ||
ExecStop=-/bin/touch /sysroot/.cleanup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters