Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a service to call signpost when we determine that the boot was successful #481

Merged
merged 1 commit into from
Nov 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/kubernetes/kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Wants=configured.target
BindsTo=containerd.service

[Service]
Type=notify
EnvironmentFile=/etc/kubernetes/kubelet/env
ExecStartPre=/sbin/iptables -P FORWARD ACCEPT
# Pull the pause container image before starting `kubelet` so `containerd/cri` wouldn't have to
Expand Down Expand Up @@ -38,3 +39,4 @@ MemoryAccounting=true

[Install]
WantedBy=multi-user.target
RequiredBy=mark-successful-boot.service
13 changes: 13 additions & 0 deletions packages/workspaces/mark-successful-boot.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Call signpost to mark the boot as successful after all required targets are met.
After=multi-user.target
tjkirch marked this conversation as resolved.
Show resolved Hide resolved
# 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.

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/signpost mark-successful-boot

[Install]
WantedBy=multi-user.target
5 changes: 4 additions & 1 deletion packages/workspaces/workspaces.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Source106: migrator.service
Source107: host-containers@.service
Source108: updog.timer
Source109: updog.service
Source110: mark-successful-boot.service

# 2xx sources: tmpfilesd configs
Source200: migration-tmpfiles.conf
Expand Down Expand Up @@ -197,7 +198,8 @@ install -p -m 0644 %{S:5} %{buildroot}%{_cross_templatedir}

install -d %{buildroot}%{_cross_unitdir}
install -p -m 0644 \
%{S:100} %{S:101} %{S:102} %{S:103} %{S:104} %{S:105} %{S:106} %{S:107} %{S:108} %{S:109} \
%{S:100} %{S:101} %{S:102} %{S:103} %{S:104} %{S:105} \
%{S:106} %{S:107} %{S:108} %{S:109} %{S:110} \
%{buildroot}%{_cross_unitdir}

install -d %{buildroot}%{_cross_tmpfilesdir}
Expand Down Expand Up @@ -263,6 +265,7 @@ install -p -m 0644 %{S:201} %{buildroot}%{_cross_tmpfilesdir}/host-containers.co

%files -n %{_cross_os}signpost
%{_cross_bindir}/signpost
%{_cross_unitdir}/mark-successful-boot.service

%files -n %{_cross_os}updog
%{_cross_bindir}/updog
Expand Down