Merge ~smoser/cloud-init:bug/lp1538522-azure-builtin-agent into cloud-init:master

Proposed by Scott Moser
Status: Merged
Merged at revision: 677b85abfb2558207956a199eaaceb91af07c076
Proposed branch: ~smoser/cloud-init:bug/lp1538522-azure-builtin-agent
Merge into: cloud-init:master
Diff against target: 29 lines (+3/-2)
1 file modified
cloudinit/sources/ (+3/-2)
Reviewer Review Type Date Requested Status
Dan Watkins Approve
Review via email:
To post a comment you must log in.
Revision history for this message
Dan Watkins (oddbloke) wrote :

One minor cleanup, but I'm +1 on this.

review: Approve
Revision history for this message
Scott Moser (smoser) wrote :

I can drop that. Tests fail with this change. :-(
I suspect they're just patching the old path but not the new one.

Revision history for this message
Dan Watkins (oddbloke) wrote :

Tests look like they're failing because they assume the not-__builtin__ code path is executed. So it's a fairly simple, mechanical fix which I'll try to get to this afternoon.

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/sources/ b/cloudinit/sources/
2index b802b03..8b9ccd6 100644
3--- a/cloudinit/sources/
4+++ b/cloudinit/sources/
5@@ -38,13 +38,14 @@ LOG = logging.getLogger(__name__)
6 DS_NAME = 'Azure'
7 DEFAULT_METADATA = {"instance-id": "iid-AZURE-NODE"}
8 AGENT_START = ['service', 'walinuxagent', 'start']
9+AGENT_START_BUILTIN = "__builtin__"
11 'sh', '-xc',
12 "i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x"
13 ]
16- 'agent_command': AGENT_START,
17+ 'agent_command': AGENT_START_BUILTIN,
18 'data_dir': "/var/lib/waagent",
19 'set_hostname': True,
20 'hostname_bounce': {
21@@ -229,7 +230,7 @@ class DataSourceAzureNet(sources.DataSource):
22 # the directory to be protected.
23 write_files(ddir, files, dirmode=0o700)
25- if self.ds_cfg['agent_command'] == '__builtin__':
26+ if self.ds_cfg['agent_command'] == AGENT_START_BUILTIN:
27 metadata_func = partial(get_metadata_from_fabric,
28 fallback_lease_file=self.
29 dhclient_lease_file)


People subscribed via source and target branches