Merge lp:~vorlon/ubuntu/vivid/cloud-init/lp.1440180 into lp:ubuntu/vivid/cloud-init

Proposed by Steve Langasek
Status: Merged
Merged at revision: 382
Proposed branch: lp:~vorlon/ubuntu/vivid/cloud-init/lp.1440180
Merge into: lp:ubuntu/vivid/cloud-init
Diff against target: 59 lines (+15/-6)
4 files modified
debian/changelog (+9/-0)
systemd/cloud-config.service (+2/-2)
systemd/cloud-final.service (+2/-2)
systemd/cloud-init.service (+2/-2)
To merge this branch: bzr merge lp:~vorlon/ubuntu/vivid/cloud-init/lp.1440180
Reviewer Review Type Date Requested Status
Scott Moser Pending
Review via email: mp+255221@code.launchpad.net

Description of the change

Investigation of bug #1425376 reveals that cloud-init's systemd units are
using network.target in a way that's not intended. This corrects the misuse.

To post a comment you must log in.
382. By Steve Langasek

Fix the systemd units to depend on network-online for network, rather than just dropping the dependency

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-04-03 13:25:47 +0000
3+++ debian/changelog 2015-04-09 14:35:41 +0000
4@@ -1,3 +1,12 @@
5+cloud-init (0.7.7~bzr1088-0ubuntu3) UNRELEASED; urgency=medium
6+
7+ * systemd/*.service: don't declare a Wants/Requires on network.target; this
8+ is a passive target that should only be pulled in by implementors of the
9+ networking service. The requirement for network needs to be
10+ expressed as a dependency on network-online.target. LP: #1440180.
11+
12+ -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 03 Apr 2015 17:56:10 -0700
13+
14 cloud-init (0.7.7~bzr1088-0ubuntu2) vivid; urgency=medium
15
16 * Don't start or restart cloud-init services on install and upgrade
17
18=== modified file 'systemd/cloud-config.service'
19--- systemd/cloud-config.service 2015-03-17 20:48:33 +0000
20+++ systemd/cloud-config.service 2015-04-09 14:35:41 +0000
21@@ -1,7 +1,7 @@
22 [Unit]
23 Description=Apply the settings specified in cloud-config
24-After=network.target cloud-config.target syslog.target
25-Wants=network.target cloud-config.target
26+After=network-online.target cloud-config.target syslog.target
27+Wants=network-online.target cloud-config.target
28
29 [Service]
30 Type=oneshot
31
32=== modified file 'systemd/cloud-final.service'
33--- systemd/cloud-final.service 2015-03-17 20:48:33 +0000
34+++ systemd/cloud-final.service 2015-04-09 14:35:41 +0000
35@@ -1,7 +1,7 @@
36 [Unit]
37 Description=Execute cloud user/final scripts
38-After=network.target cloud-config.service syslog.target rc-local.service
39-Wants=network.target cloud-config.service
40+After=network-online.target cloud-config.service syslog.target rc-local.service
41+Wants=network-online.target cloud-config.service
42
43 [Service]
44 Type=oneshot
45
46=== modified file 'systemd/cloud-init.service'
47--- systemd/cloud-init.service 2015-02-11 03:59:49 +0000
48+++ systemd/cloud-init.service 2015-04-09 14:35:41 +0000
49@@ -1,8 +1,8 @@
50 [Unit]
51 Description=Initial cloud-init job (metadata service crawler)
52-After=local-fs.target network.target cloud-init-local.service
53+After=local-fs.target network-online.target cloud-init-local.service
54 Before=sshd.service sshd-keygen.service systemd-user-sessions.service
55-Requires=network.target
56+Requires=network-online.target
57 Wants=local-fs.target cloud-init-local.service sshd.service sshd-keygen.service
58
59 [Service]

Subscribers

People subscribed via source and target branches