-
Notifications
You must be signed in to change notification settings - Fork 491
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 #1423 from arnaldo2792/new-boot-sequence
refactor system boot sequence
- Loading branch information
Showing
29 changed files
with
191 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[Unit] | ||
Description=A versatile implementation of the Network Time Protocol | ||
Documentation=https://chrony.tuxfamily.org | ||
After=network-online.target configured.target | ||
Requires=network-online.target configured.target | ||
After=network-online.target preconfigured.target | ||
Wants=network-online.target preconfigured.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/sbin/chronyd -d -F -1 | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
WantedBy=configured.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
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 |
---|---|---|
|
@@ -29,4 +29,3 @@ MemoryAccounting=true | |
|
||
[Install] | ||
WantedBy=multi-user.target | ||
RequiredBy=mark-successful-boot.service |
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 |
---|---|---|
|
@@ -29,4 +29,3 @@ MemoryAccounting=true | |
|
||
[Install] | ||
WantedBy=multi-user.target | ||
RequiredBy=mark-successful-boot.service |
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 |
---|---|---|
|
@@ -29,4 +29,3 @@ MemoryAccounting=true | |
|
||
[Install] | ||
WantedBy=multi-user.target | ||
RequiredBy=mark-successful-boot.service |
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 |
---|---|---|
|
@@ -29,4 +29,3 @@ MemoryAccounting=true | |
|
||
[Install] | ||
WantedBy=multi-user.target | ||
RequiredBy=mark-successful-boot.service |
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 |
---|---|---|
|
@@ -29,4 +29,3 @@ MemoryAccounting=true | |
|
||
[Install] | ||
WantedBy=multi-user.target | ||
RequiredBy=mark-successful-boot.service |
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
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 |
---|---|---|
@@ -1,15 +1,18 @@ | ||
[Unit] | ||
Description=Call signpost to mark the boot as successful after all required targets are met. | ||
After=multi-user.target | ||
# Each service that must start correctly in order for a boot to be successful should be of type "notify" | ||
# and include "RequiredBy=mark-successful-boot.service" in its [Install] section. | ||
# This unit is in charge of updating the partitions on successful boots. Use other service | ||
# units instead of adding more `ExecStart*` lines to prevent indirect dependencies on | ||
# other units not listed in the `RequiredBy` section. | ||
Requires=migrator.service | ||
# Block manual interactions with this service, manually running it could leave the system in an | ||
# unexpected state | ||
RefuseManualStart=true | ||
RefuseManualStop=true | ||
|
||
[Service] | ||
EnvironmentFile=/etc/network/proxy.env | ||
Type=oneshot | ||
RemainAfterExit=true | ||
ExecStart=/bin/signpost mark-successful-boot | ||
ExecStartPost=-/usr/bin/metricdog send-boot-success | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
RequiredBy=preconfigured.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 |
---|---|---|
@@ -1,11 +1,18 @@ | ||
[Unit] | ||
Description=Bottlerocket data store migrator | ||
RefuseManualStart=true | ||
RefuseManualStop=true | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/migrator --datastore-path /var/lib/bottlerocket/datastore/current --migration-directory /var/lib/bottlerocket-migrations --root-path /usr/share/updog/root.json --metadata-directory /var/cache/bottlerocket-metadata --migrate-to-version-from-os-release | ||
ExecStart=/usr/bin/migrator \ | ||
--datastore-path /var/lib/bottlerocket/datastore/current \ | ||
--migration-directory /var/lib/bottlerocket-migrations \ | ||
--root-path /usr/share/updog/root.json \ | ||
--metadata-directory /var/cache/bottlerocket-metadata \ | ||
--migrate-to-version-from-os-release | ||
RemainAfterExit=true | ||
StandardError=journal+console | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
RequiredBy=preconfigured.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
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,16 @@ | ||
[Unit] | ||
Description=Send boot success | ||
# The unit depends on 'configured.target' since Metricdog indirectly | ||
# depends on the proxy.env file created by settings-applier in the | ||
# preconfigured target | ||
After=network-online.target configured.target | ||
Wants=network-online.target configured.target | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=true | ||
EnvironmentFile=/etc/network/proxy.env | ||
ExecStart=-/usr/bin/metricdog send-boot-success | ||
|
||
[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
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,14 @@ | ||
[Unit] | ||
Description=Isolates configured.target | ||
After=preconfigured.target | ||
Requires=preconfigured.target | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/systemctl set-default configured | ||
ExecStart=/usr/bin/systemctl isolate default | ||
RemainAfterExit=true | ||
StandardError=journal+console | ||
|
||
[Install] | ||
WantedBy=preconfigured.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,14 @@ | ||
[Unit] | ||
Description=Isolates multi-user.target | ||
After=configured.target | ||
Requires=configured.target | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/systemctl set-default multi-user | ||
ExecStart=/usr/bin/systemctl isolate default | ||
RemainAfterExit=true | ||
StandardError=journal+console | ||
|
||
[Install] | ||
WantedBy=configured.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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
[Unit] | ||
Description=Bottlerocket user and dynamic configuration complete | ||
After=settings-applier.service | ||
Requires=settings-applier.service early-boot-config.service | ||
Description=Bottlerocket final configuration complete | ||
After=preconfigured.target | ||
Requires=preconfigured.target | ||
AllowIsolate=yes | ||
|
||
[Install] | ||
RequiredBy=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,7 @@ | ||
[Unit] | ||
Description=Multi-User System | ||
Documentation=man:systemd.special(7) | ||
Requires=basic.target configured.target | ||
Conflicts=rescue.service rescue.target | ||
After=basic.target rescue.service rescue.target configured.target | ||
AllowIsolate=yes |
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,11 @@ | ||
[Unit] | ||
Description=Bottlerocket initial configuration complete | ||
AllowIsolate=yes | ||
After=basic.target | ||
Requires=basic.target | ||
# Prevent manually starting/stopping the target | ||
RefuseManualStart=true | ||
RefuseManualStop=true | ||
|
||
[Install] | ||
RequiredBy=configured.target 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
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
Oops, something went wrong.