summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-01-10 11:25:34 -0500
committerScott Moser <smoser@brickies.net>2017-01-10 11:25:34 -0500
commit97dc8e3c73f4c139a17a663bef268ae854e96d4e (patch)
tree4befc0e3c8265fc1b3e5b6848a6cb3e78c79e477
parentf30d1094744493586fbc117f80d0b4b849b74ae7 (diff)
downloadcloud-init-git-ubuntu/0.7.5-0ubuntu1.20.tar.gz
Import version 0.7.5-0ubuntu1.20ubuntu/0.7.5-0ubuntu1.20
Imported using git-import-dsc
-rw-r--r--debian/changelog8
-rw-r--r--debian/patches/lp-1581200-gce-metadatafqdn.patch48
-rw-r--r--debian/patches/series1
3 files changed, 57 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 11f41249..f142eba1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+cloud-init (0.7.5-0ubuntu1.20) trusty; urgency=medium
+
+ * GCE:
+ - debian/patches/lp-1581200-gce-metadatafqdn.patch (LP: #1581200):
+ Remove trailing dot in metadata.google.internal GCE metadata lookup.
+
+ -- Phil Roche <phil.roche@canonical.com> Fri, 24 Jun 2016 11:43:42 +0100
+
cloud-init (0.7.5-0ubuntu1.19) trusty; urgency=medium
* Bigstep:
diff --git a/debian/patches/lp-1581200-gce-metadatafqdn.patch b/debian/patches/lp-1581200-gce-metadatafqdn.patch
new file mode 100644
index 00000000..9b2490a1
--- /dev/null
+++ b/debian/patches/lp-1581200-gce-metadatafqdn.patch
@@ -0,0 +1,48 @@
+From: Phil Roche <phil.roche@canonical.com>
+Date: Fri, 24 June 2016 11:33:07 +0100
+Subject: Removes trailing dot in metadata.google.internal GCE metadata lookup.
+
+Description:
+A bug was reported (lp:1581200) where if there is no DNS server configured
+or it is not running then the metadata lookup on GCE will fail as it contains a
+trailing dot 'metadata.google.internal.'. As there is no DNS configured or
+running it will use the /etc/hosts file but the hosts file does not contain
+an entry with the trailing dot.
+
+One solution is to add an entry to the /etc/hosts file with the trailing dot
+but according to the manpage, /etc/hosts entries must end with an alphanumeric
+character and cannot end with a dot.
+
+The trailing dot was added to avoid MIM by dns search but we should probably
+assume the instance being started has no DNS and as such when querying
+metadata should use a URL that will resolve using /etc/hosts.
+
+Author: Phil Roche <phil.roche@canonical.com>
+Bug-Ubuntu: https://launchpad.net/bugs/1581200
+
+Index: cloud-init-0.7.5/cloudinit/sources/DataSourceGCE.py
+===================================================================
+--- cloud-init-0.7.5.orig/cloudinit/sources/DataSourceGCE.py
++++ cloud-init-0.7.5/cloudinit/sources/DataSourceGCE.py
+@@ -25,7 +25,7 @@ from cloudinit import url_helper
+ LOG = logging.getLogger(__name__)
+
+ BUILTIN_DS_CONFIG = {
+- 'metadata_url': 'http://metadata.google.internal./computeMetadata/v1/'
++ 'metadata_url': 'http://metadata.google.internal/computeMetadata/v1/'
+ }
+ REQUIRED_FIELDS = ('instance-id', 'availability-zone', 'local-hostname')
+
+Index: cloud-init-0.7.5/tests/unittests/test_datasource/test_gce.py
+===================================================================
+--- cloud-init-0.7.5.orig/tests/unittests/test_datasource/test_gce.py
++++ cloud-init-0.7.5/tests/unittests/test_datasource/test_gce.py
+@@ -39,7 +39,7 @@ GCE_META_PARTIAL = {
+ }
+
+ HEADERS = {'X-Google-Metadata-Request': 'True'}
+-MD_URL_RE = re.compile(r'http://metadata.google.internal./computeMetadata/v1/.*')
++MD_URL_RE = re.compile(r'http://metadata.google.internal/computeMetadata/v1/.*')
+
+
+ def _request_callback(method, uri, headers):
diff --git a/debian/patches/series b/debian/patches/series
index a7788446..8d80d9c8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -22,3 +22,4 @@ lp-1506187-azure_use_unique_vm_id.patch
lp-1540965-SmartOS-Add-support-for-Joyent-LX-Brand-Zones.patch
lp-1551419-azure-handle-flipped-uuid-endianness.patch
lp-1553158-bigstep.patch
+lp-1581200-gce-metadatafqdn.patch