Repository navigation
dracut: on ec2, disable systemd-networkd if ignition fails - #118
Conversation
6003f9c to
e756c90
Compare
e756c90 to
7ff3707
Compare
| add_requires ignition-quench.service | ||
| fi | ||
|
|
||
| if [[ $(cmdline_arg coreos.oem.id) == "ec2" ]]; then |
There was a problem hiding this comment.
Probably deserves a comment.
| if [[ $(cmdline_arg coreos.oem.id) == "ec2" ]]; then | ||
| mkdir -p ${UNIT_DIR}/emergency.service.d | ||
| cat > ${UNIT_DIR}/emergency.service.d/10-conflict-networkd.conf <<-EOF | ||
| [Unit] |
There was a problem hiding this comment.
<<-EOF is not working here. You could switch to tabs, but that seems fragile. Probably better to use <<EOF and not indent.
|
|
||
| if [[ $(cmdline_arg coreos.oem.id) == "ec2" ]]; then | ||
| mkdir -p ${UNIT_DIR}/emergency.service.d | ||
| cat > ${UNIT_DIR}/emergency.service.d/10-conflict-networkd.conf <<-EOF |
There was a problem hiding this comment.
emergency.service is an implementation detail of emergency.target, and the latter is probably the unit that should conflict. (Or maybe both should, e.g. sysroot-boot.service.)
dracut-emergency.service is a different thing altogether and should also conflict: it might be invoked for certain boot failures caused by a bad Ignition config, such as a config that makes /usr unmountable.
Since you need to add multiple conflicts, it's probably easiest to add them as a drop-in on systemd-networkd.service.
If ignition fails when running on EC2, systemd-networkd should be stopped so that the instance's status checks fail and indicate ignition's failure.
7ff3707 to
9bee624
Compare
|
Updated with requested changes. |
If ignition fails when running on EC2, systemd-networkd should be stopped so that the instance's status checks fail and indicate ignition's failure.
Fixes coreos/bugs#1890.