diff --git a/templates/common/_base/units/machine-config-daemon-firstboot-v42.service b/templates/common/_base/units/machine-config-daemon-firstboot-v42.service new file mode 100644 index 0000000000..f7db6ed856 --- /dev/null +++ b/templates/common/_base/units/machine-config-daemon-firstboot-v42.service @@ -0,0 +1,21 @@ +name: "machine-config-daemon-firstboot-v42.service" +enabled: true +contents: | + [Unit] + Description=Machine Config Daemon Firstboot (4.2 bootimage) + # Make sure it runs only on OSTree booted system + ConditionPathExists=/run/ostree-booted + BindsTo=ignition-firstboot-complete.service + ConditionPathExists=/etc/ignition-machine-config-encapsulated.json + # Note the opposite of this in machine-config-daemon-firstboot + ConditionPathExists=!/sysroot/.coreos-aleph-version.json + After=ignition-firstboot-complete.service + Before=kubelet.service + + [Service] + # Need oneshot to delay kubelet + Type=oneshot + ExecStart=/usr/libexec/machine-config-daemon pivot + + [Install] + WantedBy=multi-user.target diff --git a/templates/common/_base/units/machine-config-daemon-firstboot.service b/templates/common/_base/units/machine-config-daemon-firstboot.service index 67754e1e6d..61ac9a9836 100644 --- a/templates/common/_base/units/machine-config-daemon-firstboot.service +++ b/templates/common/_base/units/machine-config-daemon-firstboot.service @@ -7,6 +7,9 @@ contents: | ConditionPathExists=/run/ostree-booted BindsTo=ignition-firstboot-complete.service ConditionPathExists=/etc/ignition-machine-config-encapsulated.json + # We only want to run on 4.3 clusters and above; this came from + # https://github.com/coreos/coreos-assembler/pull/768 + ConditionPathExists=/sysroot/.coreos-aleph-version.json After=ignition-firstboot-complete.service Before=kubelet.service diff --git a/templates/common/_base/units/machine-config-daemon-host.service b/templates/common/_base/units/machine-config-daemon-host.service index b54879179a..16ac972194 100644 --- a/templates/common/_base/units/machine-config-daemon-host.service +++ b/templates/common/_base/units/machine-config-daemon-host.service @@ -1,5 +1,5 @@ name: "machine-config-daemon-host.service" -enabled: true +enabled: false contents: | [Unit] Description=Machine Config Daemon Initial