diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-08-23 00:01:01 -0400 |
---|---|---|
committer | git-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com> | 2011-08-23 04:05:13 +0000 |
commit | c009e3bbb9842b51cd5ed4ec03c60872f7909617 (patch) | |
tree | 3cb7c8f7591b2881e7d2edb321d9e1d96f446b52 /debian/patches | |
parent | 5d12b8e451b7af79078b38de805303d1398f0026 (diff) | |
download | cloud-init-git-c009e3bbb9842b51cd5ed4ec03c60872f7909617.tar.gz |
0.6.1-0ubuntu15 (patches unapplied)
Imported using git-ubuntu import.
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/catchup-427-431.patch | 278 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 279 insertions, 0 deletions
diff --git a/debian/patches/catchup-427-431.patch b/debian/patches/catchup-427-431.patch new file mode 100644 index 00000000..fc0aae6f --- /dev/null +++ b/debian/patches/catchup-427-431.patch @@ -0,0 +1,278 @@ +------------------------------------------------------------ +revno: 431 +fixes bug(s): https://launchpad.net/bugs/828186 +committer: Scott Moser <smoser@ubuntu.com> +branch nick: trunk +timestamp: Mon 2011-08-22 23:24:08 -0400 +message: + Add some network debug info printed to the console + + When 'cloud-init start' (network) runs, it will print information + about the systems network info to the console. This will help in debugging + instances. +------------------------------------------------------------ +revno: 430 +fixes bug(s): https://launchpad.net/bugs/831505 +committer: Scott Moser <smoser@ubuntu.com> +branch nick: trunk +timestamp: Mon 2011-08-22 23:21:35 -0400 +message: + util.subp: do not attach stdin cloud-init's stdin to subprocesses (LP: 831505) + + Fix issue where 'isatty' would return true for apt-add-repository. + It would get stdin which was attached to a terminal (/dev/console) and would + thus hang when running during boot. + + This was done by changing all users of util.subp to have None input unless + input was given. In that case, the input will be the string passed in. +------------------------------------------------------------ +revno: 429 +committer: Scott Moser <smoser@ubuntu.com> +branch nick: trunk +timestamp: Mon 2011-08-22 22:56:45 -0400 +message: + fix for syntax error around ecdsa changes +------------------------------------------------------------ +revno: 428 [merge] +committer: Dustin Kirkland <kirkland@ubuntu.com> +branch nick: cloud-init +timestamp: Mon 2011-08-22 13:45:14 -0500 +message: + merge from Adam, fixes LP: #831505 +------------------------------------------------------------ +revno: 427 +committer: Scott Moser <smoser@ubuntu.com> +branch nick: trunk +timestamp: Mon 2011-08-15 16:39:21 -0500 +message: + add awareness of ecdsa keys. +------------------------------------------------------------ +Use --include-merges or -n0 to see merged revisions. +=== modified file 'ChangeLog' +--- old/ChangeLog 2011-08-03 19:19:31 +0000 ++++ new/ChangeLog 2011-08-23 03:24:08 +0000 +@@ -38,6 +38,13 @@ + * boothooks will now run more than once as they were intended (and as bootcmd + commands do) + * cloud-config and user-scripts will be updated from user data every boot ++ - Fix issue where 'isatty' would return true for apt-add-repository. ++ apt-add-repository would get stdin which was attached to a terminal ++ (/dev/console) and would thus hang when running during boot. (LP: 831505) ++ This was done by changing all users of util.subp to have None input unless specified ++ - Add some debug info to the console when cloud-init runs. ++ This is useful if debugging, IP and route information is printed to the console. ++ + 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 + +=== modified file 'cloud-init.py' +--- old/cloud-init.py 2011-08-02 21:09:43 +0000 ++++ new/cloud-init.py 2011-08-23 03:24:08 +0000 +@@ -24,6 +24,7 @@ + import cloudinit.util as util + import cloudinit.CloudConfig as CC + import cloudinit.DataSource as ds ++import cloudinit.netinfo as netinfo + import time + import logging + import errno +@@ -87,6 +88,8 @@ + nonet_path = "%s/%s" % (cloudinit.get_cpath("data"), "no-net") + + if cmd == "start": ++ print netinfo.debug_info() ++ + stop_files = ( cloudinit.get_ipath_cur("obj_pkl"), nonet_path ) + # if starting as the network start, there are cases + # where everything is already done for us, and it makes + +=== modified file 'cloudinit/CloudConfig/cc_phone_home.py' +--- old/cloudinit/CloudConfig/cc_phone_home.py 2011-01-26 14:03:46 +0000 ++++ new/cloudinit/CloudConfig/cc_phone_home.py 2011-08-15 21:39:21 +0000 +@@ -20,7 +20,7 @@ + from time import sleep + + frequency = per_instance +-post_list_all = [ 'pub_key_dsa', 'pub_key_rsa', 'instance_id', 'hostname' ] ++post_list_all = [ 'pub_key_dsa', 'pub_key_rsa', 'pub_key_ecdsa', 'instance_id', 'hostname' ] + + # phone_home: + # url: http://my.foo.bar/$INSTANCE/ +@@ -29,7 +29,7 @@ + # + # phone_home: + # url: http://my.foo.bar/$INSTANCE_ID/ +-# post: [ pub_key_dsa, pub_key_rsa, instance_id ++# post: [ pub_key_dsa, pub_key_rsa, pub_key_ecdsa, instance_id + # + def handle(name,cfg,cloud,log,args): + if len(args) != 0: +@@ -61,6 +61,7 @@ + pubkeys = { + 'pub_key_dsa': '/etc/ssh/ssh_host_dsa_key.pub', + 'pub_key_rsa': '/etc/ssh/ssh_host_rsa_key.pub', ++ 'pub_key_ecdsa': '/etc/ssh/ssh_host_ecdsa_key.pub', + } + + for n, path in pubkeys.iteritems(): + +=== modified file 'cloudinit/CloudConfig/cc_ssh.py' +--- old/cloudinit/CloudConfig/cc_ssh.py 2011-06-17 15:40:41 +0000 ++++ new/cloudinit/CloudConfig/cc_ssh.py 2011-08-23 02:56:45 +0000 +@@ -40,14 +40,18 @@ + "rsa_private" : ("/etc/ssh/ssh_host_rsa_key", 0600), + "rsa_public" : ("/etc/ssh/ssh_host_rsa_key.pub", 0644), + "dsa_private" : ("/etc/ssh/ssh_host_dsa_key", 0600), +- "dsa_public" : ("/etc/ssh/ssh_host_dsa_key.pub", 0644) ++ "dsa_public" : ("/etc/ssh/ssh_host_dsa_key.pub", 0644), ++ "ecdsa_private" : ("/etc/ssh/ssh_host_ecdsa_key", 0600), ++ "ecdsa_public" : ("/etc/ssh/ssh_host_ecdsa_key.pub", 0644), + } + + for key,val in cfg["ssh_keys"].items(): + if key2file.has_key(key): + util.write_file(key2file[key][0],val,key2file[key][1]) + +- priv2pub = { 'rsa_private':'rsa_public', 'dsa_private':'dsa_public' } ++ priv2pub = { 'rsa_private':'rsa_public', 'dsa_private':'dsa_public', ++ 'ecdsa_private': 'ecdsa_public', } ++ + cmd = 'o=$(ssh-keygen -yf "%s") && echo "$o" root@localhost > "%s"' + for priv,pub in priv2pub.iteritems(): + if pub in cfg['ssh_keys'] or not priv in cfg['ssh_keys']: continue +@@ -58,6 +62,7 @@ + # if not, generate them + genkeys ='ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N ""; ' + genkeys+='ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N ""; ' ++ genkeys+='ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -t ecdsa -N ""; ' + subprocess.call(('sh', '-c', "{ %s } </dev/null" % (genkeys))) + + try: + +=== added file 'cloudinit/netinfo.py' +--- old/cloudinit/netinfo.py 1970-01-01 00:00:00 +0000 ++++ new/cloudinit/netinfo.py 2011-08-23 03:24:08 +0000 +@@ -0,0 +1,83 @@ ++import subprocess ++ ++def netdev_info(): ++ fields = ( "hwaddr", "addr", "bcast", "mask" ) ++ ifcfg_out = subprocess.check_output(["ifconfig", "-a"]) ++ devs = { } ++ for line in ifcfg_out.splitlines(): ++ if len(line) == 0: ++ continue ++ if line[0] not in ("\t", " "): ++ curdev = line.split()[0] ++ devs[curdev] = { "up": False } ++ for field in fields: ++ devs[curdev][field] = "" ++ toks = line.lower().strip().split() ++ if toks[0] == "up": ++ devs[curdev]['up'] = True ++ ++ fieldpost = "" ++ if toks[0] == "inet6": ++ fieldpost = "6" ++ ++ for i in range(len(toks)): ++ if toks[i] == "hwaddr": ++ try: ++ devs[curdev]["hwaddr"] = toks[i+1] ++ except IndexError as e: ++ pass ++ for field in ("addr", "bcast", "mask"): ++ target = "%s%s" % (field, fieldpost) ++ if devs[curdev].get(target,""): ++ continue ++ if toks[i] == "%s:" % field: ++ try: ++ devs[curdev][target] = toks[i+1] ++ except IndexError as e: ++ pass ++ elif toks[i].startswith("%s:" % field): ++ devs[curdev][target] = toks[i][len(field)+1:] ++ return(devs) ++ ++def route_info(): ++ route_out = subprocess.check_output(["route", "-n"]) ++ routes = [ ] ++ for line in route_out.splitlines()[1:]: ++ if not line: ++ continue ++ toks = line.split() ++ if toks[0] == "Kernel" or toks[0] == "Destination": ++ continue ++ routes.append(toks) ++ return(routes) ++ ++def getgateway(): ++ for r in route_info(): ++ if r[3].find("G") >= 0: ++ return("%s[%s]" % (r[1],r[7])) ++ return(None) ++ ++def debug_info(pre="ci-info: "): ++ lines = [ ] ++ try: ++ netdev = netdev_info() ++ except Exception as e: ++ lines.append("netdev_info failed!") ++ netdev = [] ++ for (dev, d) in netdev.iteritems(): ++ lines.append("%s%-6s: %i %-15s %-15s %s" % ++ (pre, dev, d["up"], d["addr"],d["mask"], d["hwaddr"])) ++ try: ++ routes = route_info() ++ except Exception as e: ++ lines.append("route_info failed") ++ routes = [] ++ n = 0 ++ for r in routes: ++ lines.append("%sroute-%d: %-15s %-15s %-15s %-6s %s" % ++ (pre, n, r[0], r[1], r[2], r[7], r[3])) ++ n = n+1 ++ return('\n'.join(lines)) ++ ++if __name__ == '__main__': ++ print debug_info() + +=== modified file 'cloudinit/util.py' +--- old/cloudinit/util.py 2011-08-03 17:40:07 +0000 ++++ new/cloudinit/util.py 2011-08-23 03:21:35 +0000 +@@ -141,10 +141,8 @@ + return + + def subp(args, input=None): +- s_in = None +- if input is not None: +- s_in = subprocess.PIPE +- sp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=s_in) ++ sp = subprocess.Popen(args, stdout=subprocess.PIPE, ++ stderr=subprocess.PIPE, stdin=subprocess.PIPE) + out,err = sp.communicate(input) + if sp.returncode is not 0: + raise subprocess.CalledProcessError(sp.returncode,args, (out,err)) + +=== modified file 'doc/examples/cloud-config.txt' +--- old/doc/examples/cloud-config.txt 2011-08-03 19:21:26 +0000 ++++ new/doc/examples/cloud-config.txt 2011-08-15 21:39:21 +0000 +@@ -135,6 +135,7 @@ + # Send pre-generated ssh private keys to the server + # If these are present, they will be written to /etc/ssh and + # new random keys will not be generated ++# in addition to 'rsa' and 'dsa' as shown below, 'ecdsa' is also supported + ssh_keys: + rsa_private: | + -----BEGIN RSA PRIVATE KEY----- +@@ -391,7 +392,7 @@ + # + phone_home: + url: http://my.example.com/$INSTANCE_ID/ +- post: [ pub_key_dsa, pub_key_rsa, instance_id ] ++ post: [ pub_key_dsa, pub_key_rsa, pub_key_ecdsa, instance_id ] + + # timezone: set the timezone for this instance + # the value of 'timezone' must exist in /usr/share/zoneinfo + diff --git a/debian/patches/series b/debian/patches/series index c77061b4..78111da2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,4 @@ catchup-406.patch catchup-407-415.patch catchup-416-417.patch catchup-418-426.patch +catchup-427-431.patch |