bionic still installs 'clean-shutdown' service even though no /sbin/ifdown exists

Bug #1764281 reported by John A Meinel
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned
2.3
Won't Fix
High
Unassigned

Bug Description

As part of bootstrap (and maybe elsewhere), juju ends up setting this in cloud-init:
'set -xe',
"install -D -m 644 /dev/null '/etc/systemd/system/juju-clean-shutdown.service'",
"printf '%s\\n' '\n[Unit]\nDescription=Stop all network interfaces on shutdown\nDefaultDependencies=false\nAfter=final.target\n\n[Service]\nType=oneshot\nExecStart=/sbin/ifdown -a -v --force\nStandardOutput=tty\nStandardError=tty\n\n[Install]\nWantedBy=final.target\n' > '/etc/systemd/system/juju-clean-shutdown.service'", "/bin/systemctl enable '/etc/systemd/system/juju-clean-shutdown.service'"

Which means we create a systemd service that looks like:
+ install -D -m 644 /dev/null /etc/systemd/system/juju-clean-shutdown.service
+ printf %s\n
[Unit]
Description=Stop all network interfaces on shutdown
DefaultDependencies=false
After=final.target

[Service]
Type=oneshot
ExecStart=/sbin/ifdown -a -v --force
StandardOutput=tty
StandardError=tty

[Install]
WantedBy=final.target

I think this was an attempt to deal with shutdown and restart issues.

However, "/sbin/ifdown" doesn't exist on Bionic, so we certainly shouldn't be installing a service that wants to be running it.

I don't fully understand "oneshot" type services in systemd. Or exactly why this was created in the first place.

It may be that we can just omit it entirely, or it may be that we should be transitioning to some sort of netplan based "shutdown cleanly".

Revision history for this message
Anastasia (anastasia-macmood) wrote :

Marking as Won't Fix for 2.3 series since we are not planning to make any further releases in this series at this stage.

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: High → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.