-
Notifications
You must be signed in to change notification settings - Fork 412
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 #4423 from yuqi-zhang/aro-dnsmasq-2
OCPBUGS-35300: MCD-pull: run after network-online.target in Azure
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
templates/common/azure/units/machine-config-daemon-pull.service.yaml
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,24 @@ | ||
name: "machine-config-daemon-pull.service" | ||
enabled: true | ||
contents: | | ||
[Unit] | ||
Description=Machine Config Daemon Pull | ||
# Make sure it runs only on OSTree booted system | ||
ConditionPathExists=/run/ostree-booted | ||
# This "stamp file" is unlinked when we complete | ||
# machine-config-daemon-firstboot.service | ||
ConditionPathExists=/etc/ignition-machine-config-encapsulated.json | ||
# Run after crio-wipe so the pulled MCD image is protected against a corrupted storage from a forced shutdown | ||
Wants=crio-wipe.service network-online.target | ||
After=crio-wipe.service network-online.target | ||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/bin/sh -c "while ! /usr/bin/podman pull --authfile=/var/lib/kubelet/config.json '{{ .Images.machineConfigOperator }}'; do sleep 1; done" | ||
{{if .Proxy -}} | ||
EnvironmentFile=/etc/mco/proxy.env | ||
{{end -}} | ||
[Install] | ||
RequiredBy=machine-config-daemon-firstboot.service |