diff options
author | Scott Moser <smoser@ubuntu.com> | 2013-07-29 12:02:03 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-07-29 12:02:03 -0400 |
commit | e9f1190993fc5e66cd7bcc47016a5d7335fe8763 (patch) | |
tree | 47b98a88a59b047e1049ce0c3b2ad2b407c2b6f9 /cloudinit/sources/DataSourceAzure.py | |
parent | 9da084bda820d0ab8500ea6ee13a014f46d3bfab (diff) | |
download | vyos-cloud-init-e9f1190993fc5e66cd7bcc47016a5d7335fe8763.tar.gz vyos-cloud-init-e9f1190993fc5e66cd7bcc47016a5d7335fe8763.zip |
DataSourceAzure: do not capture output of bounce command
As shown in comments of bug 1202758 and filing of ntp bug 1206164, waiting
for the output of this command causes us to wait for ntpdate to fully
finish.
Ideally I think we'd disable ntpdate running on this run, but
that is not trivially possible.
Diffstat (limited to 'cloudinit/sources/DataSourceAzure.py')
-rw-r--r-- | cloudinit/sources/DataSourceAzure.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index 9503b045..2f28702e 100644 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -206,9 +206,11 @@ def apply_hostname_bounce(hostname, policy, interface, command, command = BOUNCE_COMMAND LOG.debug("pubhname: publishing hostname [%s]", msg) + start = time.time() shell = not isinstance(command, (list, tuple)) - (output, err) = util.subp(command, shell=shell, capture=True, env=env) - LOG.debug("output: %s. err: %s", output, err) + # capture=False, see comments in bug 1202758 and bug 1206164. + (output, err) = util.subp(command, shell=shell, capture=False, env=env) + LOG.debug("publishing hostname took %.3f seconds", time.time() - start) def crtfile_to_pubkey(fname): |