summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--cloudinit/DataSourceNoCloud.py2
-rw-r--r--cloudinit/util.py8
3 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 14039690..f9f2a2ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,7 @@
- sanitize hosts file for system's hostname to 127.0.1.1 (LP: #802637)
- add chef support (cloudinit/CloudConfig/cc_chef.py)
- do not give trace on failure to resize in lxc container (LP: #800856)
+ - increase the timeout on url gets for "seedfrom" values (LP: #812646)
0.6.1:
- fix bug in fixing permission on /var/log/cloud-init.log (LP: #704509)
- improve comment strings in rsyslog file tools/21-cloudinit.conf
diff --git a/cloudinit/DataSourceNoCloud.py b/cloudinit/DataSourceNoCloud.py
index 3d429bc5..e9e9c152 100644
--- a/cloudinit/DataSourceNoCloud.py
+++ b/cloudinit/DataSourceNoCloud.py
@@ -86,7 +86,7 @@ class DataSourceNoCloud(DataSource.DataSource):
# this could throw errors, but the user told us to do it
# so if errors are raised, let them raise
- (md_seed,ud) = util.read_seeded(seedfrom)
+ (md_seed,ud) = util.read_seeded(seedfrom, timeout=None)
log.debug("using seeded cache data from %s" % seedfrom)
# values in the command line override those from the seed
diff --git a/cloudinit/util.py b/cloudinit/util.py
index ec37f2f7..b3842afa 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -189,8 +189,12 @@ def read_seeded(base="", ext="", timeout=2):
md_url = "%s%s%s" % (base, "meta-data", ext)
try:
- md_resp = urllib2.urlopen(urllib2.Request(md_url), timeout=timeout)
- ud_resp = urllib2.urlopen(urllib2.Request(ud_url), timeout=timeout)
+ if timeout == None:
+ md_resp = urllib2.urlopen(urllib2.Request(md_url))
+ ud_resp = urllib2.urlopen(urllib2.Request(ud_url))
+ else:
+ md_resp = urllib2.urlopen(urllib2.Request(md_url), timeout=timeout)
+ ud_resp = urllib2.urlopen(urllib2.Request(ud_url), timeout=timeout)
md_str = md_resp.read()
ud = ud_resp.read()