[cloud-init/el6] Correctly generate IP-based hostnames [RH:857502 LP:1050962]

Andy Grimm arg at fedoraproject.org
Thu Dec 13 20:09:42 UTC 2012


commit 780eeb6eebdc18f536f6b9612233af273e09ce91
Author: Andy Grimm <agrimm at gmail.com>
Date:   Thu Dec 13 15:09:28 2012 -0500

    Correctly generate IP-based hostnames [RH:857502 LP:1050962]

 cloud-init-0.6.3-ip-based-hostname.patch |   13 +++++++++++++
 cloud-init.spec                          |    7 +++++++
 2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/cloud-init-0.6.3-ip-based-hostname.patch b/cloud-init-0.6.3-ip-based-hostname.patch
new file mode 100644
index 0000000..1a82bcc
--- /dev/null
+++ b/cloud-init-0.6.3-ip-based-hostname.patch
@@ -0,0 +1,13 @@
+=== modified file 'cloudinit/DataSource.py'
+--- cloudinit/DataSource.py	2012-03-19 17:33:39 +0000
++++ cloudinit/DataSource.py	2012-09-14 15:44:22 +0000
+@@ -136,7 +136,7 @@
+             # make up a hostname (LP: #475354) in format ip-xx.xx.xx.xx
+             lhost = self.metadata['local-hostname']
+             if is_ipv4(lhost):
+-                toks = "ip-%s" % lhost.replace(".", "-")
++                toks = [ "ip-%s" % lhost.replace(".", "-") ]
+             else:
+                 toks = lhost.split(".")
+ 
+
diff --git a/cloud-init.spec b/cloud-init.spec
index 18728c3..dc9e3bc 100644
--- a/cloud-init.spec
+++ b/cloud-init.spec
@@ -32,6 +32,9 @@ Patch5:         cloud-init-0.6.3-yum.patch
 # https://bugs.launchpad.net/cloud-init/+bug/1040200
 # http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/revision/635
 Patch6:         cloud-init-0.6.3-fqdn.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=857502
+# https://bugs.launchpad.net/cloud-init/+bug/1050962
+Patch7:         cloud-init-0.6.3-ip-based-hostname.patch
 
 Patch100:       cloud-init-0.6.3-use-python2.6.patch
 Patch101:       cloud-init-0.6.3-ext4.patch
@@ -85,6 +88,7 @@ ssh keys and to let the user run various scripts.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p0
 %if 0%{?rhel} <= 5
 %patch100 -p0
 %patch101 -p1
@@ -165,6 +169,9 @@ fi
 
 
 %changelog
+* Wed Dec 13 2012 Andy Grimm <agrimm at gmail.com> - 0.6.3-0.12.bzr532
+- Correctly generate IP-based hostnames [RH:857502 LP:1050962]
+
 * Thu Sep 13 2012 Garrett Holmstrom <gholms at fedoraproject.org> - 0.6.3-0.11.bzr532
 - Use a FQDN (instance-data.) for instance data URL fallback [RH:850916 LP:1040200]
 


More information about the scm-commits mailing list