diff options
author | Paul Meyer <paulmey@microsoft.com> | 2017-09-18 16:07:46 -0600 |
---|---|---|
committer | Chad Smith <chad.smith@canonical.com> | 2017-09-18 16:07:46 -0600 |
commit | eaadf52b1010cf189bde2a6abb3265b890f6d36d (patch) | |
tree | 5987bca22d8369459716c405e93491d77fc19d65 /cloudinit | |
parent | 10f067d87a2d48092c593862e686c517c57b987c (diff) | |
download | vyos-cloud-init-eaadf52b1010cf189bde2a6abb3265b890f6d36d.tar.gz vyos-cloud-init-eaadf52b1010cf189bde2a6abb3265b890f6d36d.zip |
Azure: wait longer for SSH pub keys to arrive.
Currently the Azure data source waits up to 60 seconds. This has proven
not to be sufficient to provide resiliency to unrelated transient failures
in other parts of the infrastructure. Azure already has logic outside of
the VM to abort hung provisioning. This changes lengthens the time out to
15 minutes.
LP: #1717611
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/sources/DataSourceAzure.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index b5a95a1f..80c2bd12 100644 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -317,9 +317,13 @@ class DataSourceAzure(sources.DataSource): LOG.debug("ssh authentication: " "using fingerprint from fabirc") - missing = util.log_time(logfunc=LOG.debug, msg="waiting for files", + # wait very long for public SSH keys to arrive + # https://bugs.launchpad.net/cloud-init/+bug/1717611 + missing = util.log_time(logfunc=LOG.debug, + msg="waiting for SSH public key files", func=wait_for_files, - args=(fp_files,)) + args=(fp_files, 900)) + if len(missing): LOG.warning("Did not find files, but going on: %s", missing) @@ -656,7 +660,7 @@ def pubkeys_from_crt_files(flist): return pubkeys -def wait_for_files(flist, maxwait=60, naplen=.5, log_pre=""): +def wait_for_files(flist, maxwait, naplen=.5, log_pre=""): need = set(flist) waited = 0 while True: |