diff options
author | Scott Moser <smoser@brickies.net> | 2016-11-09 08:20:02 -0500 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-11-22 12:59:15 -0500 |
commit | 677b85abfb2558207956a199eaaceb91af07c076 (patch) | |
tree | 74d12daf3d461fc3e38235280a0f8bce326965f1 /cloudinit/sources | |
parent | 18203bf101dc04c28b53a92cd95c8be88959c428 (diff) | |
download | vyos-cloud-init-677b85abfb2558207956a199eaaceb91af07c076.tar.gz vyos-cloud-init-677b85abfb2558207956a199eaaceb91af07c076.zip |
Azure: No longer rely on walinux agent.
Cloud-init has for some time relied on walinuxagent to do some bits
of work necessary for instance initialization. That reliance has
not been needed for a while, but we have still defaulted to it.
This change uses the "builtin" path that Daniel Watkins added
some time ago by default. Also, Adjust tests that assumed the
non-__builtin__ Azure agent_command.
LP: #1538522
Diffstat (limited to 'cloudinit/sources')
-rw-r--r-- | cloudinit/sources/DataSourceAzure.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index 22f9004a..af5d43b0 100644 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -36,6 +36,7 @@ LOG = logging.getLogger(__name__) DS_NAME = 'Azure' DEFAULT_METADATA = {"instance-id": "iid-AZURE-NODE"} AGENT_START = ['service', 'walinuxagent', 'start'] +AGENT_START_BUILTIN = "__builtin__" BOUNCE_COMMAND = [ 'sh', '-xc', "i=$interface; x=0; ifdown $i || x=$?; ifup $i || x=$?; exit $x" @@ -45,7 +46,7 @@ BOUNCE_COMMAND = [ RESOURCE_DISK_PATH = '/dev/disk/cloud/azure_resource' BUILTIN_DS_CONFIG = { - 'agent_command': AGENT_START, + 'agent_command': AGENT_START_BUILTIN, 'data_dir': "/var/lib/waagent", 'set_hostname': True, 'hostname_bounce': { @@ -230,7 +231,7 @@ class DataSourceAzureNet(sources.DataSource): # the directory to be protected. write_files(ddir, files, dirmode=0o700) - if self.ds_cfg['agent_command'] == '__builtin__': + if self.ds_cfg['agent_command'] == AGENT_START_BUILTIN: metadata_func = partial(get_metadata_from_fabric, fallback_lease_file=self. dhclient_lease_file) |