Skip to content

Commit

Permalink
templates: add After=ostree-finalize-staged.service to kubelet.service
Browse files Browse the repository at this point in the history
We've seen occasional issues during upgrades caused by what seems to be
the kubelet still being active during OSTree finalization. If the
kubelet changes things in `/etc`, it'll confuse OSTree which is trying
to do the `/etc` merge.

We want to be sure that the kubelet is done modifying everything it
needs to in `/etc` and that it exited before we finalize the deployment.

Add a `After=ostree-finalize-staged.service` for this. The way this
works is that that service runs in its `ExecStop`, and shutdown ordering
is the reverse of startup. So this will cause the kubelet to exit before
`ostree-finalize-staged.service` is stopped.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1902963
  • Loading branch information
jlebon committed Feb 17, 2021
1 parent 61a1377 commit 0369c47
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ contents: |
Description=Kubernetes Kubelet
Wants=rpc-statd.service network-online.target crio.service
After=network-online.target crio.service
After=ostree-finalize-staged.service
[Service]
Type=notify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ contents: |
Description=Kubernetes Kubelet
Wants=rpc-statd.service network-online.target crio.service
After=network-online.target crio.service
After=ostree-finalize-staged.service
[Service]
Type=notify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ contents: |
Description=Kubernetes Kubelet
Wants=rpc-statd.service network-online.target crio.service
After=network-online.target crio.service
After=ostree-finalize-staged.service
[Service]
Type=notify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ contents: |
Description=Kubernetes Kubelet
Wants=rpc-statd.service network-online.target crio.service
After=network-online.target crio.service
After=ostree-finalize-staged.service
[Service]
Type=notify
Expand Down

0 comments on commit 0369c47

Please sign in to comment.