diff options
author | Daniel Watkins <daniel.watkins@canonical.com> | 2015-02-18 18:10:15 +0000 |
---|---|---|
committer | Daniel Watkins <daniel.watkins@canonical.com> | 2015-02-18 18:10:15 +0000 |
commit | d3d44a3efaf22c91d342f2cb81470745b7be0658 (patch) | |
tree | b9ed93eebc317217ff89bf3f188c950e16a50330 /cloudinit | |
parent | 5e864eb373ead67d2bc29a19d970f9d3d94c53df (diff) | |
download | vyos-cloud-init-d3d44a3efaf22c91d342f2cb81470745b7be0658.tar.gz vyos-cloud-init-d3d44a3efaf22c91d342f2cb81470745b7be0658.zip |
Set an explicit timeout when fetching CloudStack passwords.
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/sources/DataSourceCloudStack.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceCloudStack.py b/cloudinit/sources/DataSourceCloudStack.py index a8f8daec..89f58e1e 100644 --- a/cloudinit/sources/DataSourceCloudStack.py +++ b/cloudinit/sources/DataSourceCloudStack.py @@ -143,6 +143,7 @@ class DataSourceCloudStack(sources.DataSource): # so we use the socket directly to read off the password. conn = http_client.HTTPConnection(self.vr_addr, 8080) conn.request('GET', '', headers={'DomU_Request': req_string}) + conn.sock.settimeout(30) output = conn.sock.recv(1024).decode('utf-8').strip() conn.close() return output |