ephemeral-disk-warning.service causes ordering cycle on multi-user.target
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
walinuxagent (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Scott Moser |
Bug Description
=== Begin SRU Template ===
[Impact]
Some recent systemd related cloud-init changes in 0.7.7-28-
and later caused systemd 'ordering cycle' around the walinuxagent provided
ephemeral-
The result would be that journalctl would report:
Breaking ordering cycle by deleting job ephemeral-
Due to a order cycle
* An explanation of the effects of the bug on users and
* justification for backporting the fix to the stable release.
* In addition, it is helpful, but not required, to include an
explanation of how the upload fixes this bug.
[Test Case]
Boot system on azure, then run:
$ journalctl | grep -i "ordering cycle"
There *should* be no ordering cycles in our boot.
$ systemctl status ephemeral-
Condition: start condition failed at Tue 2016-09-20 16:15:03 UTC; 37min ago
That is the failure, to show it functional and fixed
$ echo "deb http://
sudo tee /etc/apt/
$ sudo apt-get update -qy
$ sudo apt-get -qy install walinuxagent
$ dpkg-query --show walinuxagent
$ sudo reboot
Then repeat the above, and you should see no 'ordering cycle' messages, and
$ systemctl status ephemeral-
Active: active (exited) since Tue 2016-09-20 17:08:46 UTC; 1h 0min ago
And the file that gets created should be there.
$ ls -l /mnt/DATALOSS_
-r--r--r-- 1 root root 639 Sep 20 17:08 /mnt/DATALOSS_
[Regression Potential]
Changing order of boot is quite often painful due to subtle changes and
the overall newness of systemd. The changes here are fairly well tested
and fix an issue. Worst case, that job does not run (as it does not run now)
and we do not get the file created.
[Other Info]
This is fallout of fix for bug 1576692.
Full description of the fix is:
debian/
ephemeral-
which implies "Before" of multi-user.target. It also had
After of cloud-final.
After multi-user.target, that caused the cycle.
Relax this to be only After cloud-config.
before multi-user.target does and avoid the cycle.
Also add a 'Description'.
LP: #1624596
--- End SRU Template ---
$ journalctl | grep break -a2 -b8
42956-Sep 17 01:45:02 smoser0917x systemd[1]: Detected virtualization microsoft.
43031-Sep 17 01:45:02 smoser0917x systemd[1]: Detected architecture x86-64.
43101-Sep 17 01:45:02 smoser0917x systemd[1]: Set hostname to <smoser0917x>.
43172-Sep 17 01:45:02 smoser0917x systemd[1]: multi-user.target: Found ordering cycle on multi-user.
43279-Sep 17 01:45:02 smoser0917x systemd[1]: multi-user.target: Found dependency on ephemeral-
43395-Sep 17 01:45:02 smoser0917x systemd[1]: multi-user.target: Found dependency on cloud-final.
43500-Sep 17 01:45:02 smoser0917x systemd[1]: multi-user.target: Found dependency on multi-user.
43603-Sep 17 01:45:02 smoser0917x systemd[1]: multi-user.target: Breaking ordering cycle by deleting job ephemeral-
43739:Sep 17 01:45:02 smoser0917x systemd[1]: ephemeral-
43922-Sep 17 01:45:02 smoser0917x systemd[1]: Listening on udev Kernel Socket.
43995-Sep 17 01:45:02 smoser0917x systemd[1]: Reached target Encrypted Volumes.
44069-Sep 17 01:45:02 smoser0917x systemd[1]: Listening on Syslog Socket.
44137-Sep 17 01:45:02 smoser0917x systemd[1]: Started Forward Password Requests to Wall Directory Watch.
44236-Sep 17 01:45:02 smoser0917x systemd[1]: Listening on Journal Socket.
44305-Sep 17 01:45:02 smoser0917x systemd[1]: Listening on LVM2 poll daemon socket.
44383-Sep 17 01:45:02 smoser0917x systemd[1]: Reached target Swap.
44444-Sep 17 01:45:02 smoser0917x systemd[1]: Listening on fsck to fsckd communication Socket.
$ dpkg-query --show cloud-init walinuxagent
cloud-init 0.7.8-1-
walinuxagent 2.1.3-0ubuntu4.1
Related bugs:
* bug 1576692: fully support package installation in systemd
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: walinuxagent 2.1.3-0ubuntu4.1
ProcVersionSign
Uname: Linux 4.4.0-36-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Sat Sep 17 01:51:22 2016
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: walinuxagent
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in walinuxagent (Ubuntu Xenial): | |
assignee: | nobody → Scott Moser (smoser) |
importance: | Undecided → Medium |
status: | New → Confirmed |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Seems to fix: disk-warning. service disk-warning. service system/ ephemeral- disk-warning. service; enabled; vendor preset: enabled) /usr/sbin/ ephemeral- disk-warning. sh (code=exited, status=0/SUCCESS) slice/ephemeral -disk-warning. service
$ systemctl status ephemeral-
● ephemeral-
Loaded: loaded (/lib/systemd/
Active: active (exited) since Sat 2016-09-17 01:57:46 UTC; 3min 29s ago
Process: 2929 ExecStart=
Main PID: 2929 (code=exited, status=0/SUCCESS)
Tasks: 0
Memory: 0B
CPU: 0
CGroup: /system.
Sep 17 01:57:46 smoser0917x systemd[1]: Starting ephemeral- disk-warning. service. .. disk-warning. service.
Sep 17 01:57:46 smoser0917x systemd[1]: Started ephemeral-
$ diff -u /lib/systemd/ system/ ephemeral- disk-warning. service. dist /lib/systemd/ system/ ephemeral- disk-warning. service system/ ephemeral- disk-warning. service. dist 2016-09-17 02:02:16.005185102 +0000 system/ ephemeral- disk-warning. service 2016-09-17 02:02:08.997530604 +0000 cloud-final. service cloud-config. service alization= microsoft sMountPoint= /mnt xists=/ dev/disk/ azure/resource- part1
--- /lib/systemd/
+++ /lib/systemd/
@@ -1,6 +1,6 @@
[Unit]
Description=
-After=
+After=
ConditionVirtu
ConditionPathI
ConditionPathE