Merge lp:~harlowja/cloud-init/rework into lp:~cloud-init-dev/cloud-init/trunk

Proposed by Joshua Harlow
Status: Merged
Merged at revision: 589
Proposed branch: lp:~harlowja/cloud-init/rework
Merge into: lp:~cloud-init-dev/cloud-init/trunk
Diff against target: 43 lines (+13/-1)
3 files modified
TODO (+9/-0)
cloudinit/helpers.py (+3/-0)
cloudinit/util.py (+1/-1)
To merge this branch: bzr merge lp:~harlowja/cloud-init/rework
Reviewer Review Type Date Requested Status
cloud-init Commiters Pending
Review via email: mp+114242@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'TODO'
2--- TODO 2012-07-06 17:53:35 +0000
3+++ TODO 2012-07-10 18:30:32 +0000
4@@ -35,3 +35,12 @@
5 something to remove later, and just recommend using 'chroot' instead (or the X
6 different other options which are similar to 'chroot'), which is might be more
7 natural and less confusing...
8+- Instead of just warning when a module is being ran on a 'unknown' distribution
9+ perhaps we should not run that module in that case? Or we might want to start
10+ reworking those modules so they will run on all distributions? Or if that is
11+ not the case, then maybe we want to allow fully specified python paths for
12+ modules and start encouraging packages of 'ubuntu' modules, packages of 'rhel'
13+ specific modules that people can add instead of having them all under the
14+ cloud-init 'root' tree? This might encourage more development of other modules
15+ instead of having to go edit the cloud-init code to accomplish this.
16+
17
18=== modified file 'cloudinit/helpers.py'
19--- cloudinit/helpers.py 2012-06-29 20:20:09 +0000
20+++ cloudinit/helpers.py 2012-07-10 18:30:32 +0000
21@@ -67,6 +67,9 @@
22 def __init__(self, fn):
23 self.fn = fn
24
25+ def __str__(self):
26+ return "<%s using file %r>" % (util.obj_name(self), self.fn)
27+
28
29 class FileSemaphores(object):
30 def __init__(self, sem_path):
31
32=== modified file 'cloudinit/util.py'
33--- cloudinit/util.py 2012-07-09 19:08:27 +0000
34+++ cloudinit/util.py 2012-07-10 18:30:32 +0000
35@@ -828,7 +828,7 @@
36 if _CLOUD_INIT_SAVE_STDIN is set in environment to a non empty or '0' value
37 then input will not be closed (only useful potentially for debugging).
38 """
39- if os.environ.get("_CLOUD_INIT_SAVE_STDIN") in ("", "0", 'False'):
40+ if is_false(os.environ.get("_CLOUD_INIT_SAVE_STDIN")):
41 return
42 with open(os.devnull) as fp:
43 os.dup2(fp.fileno(), sys.stdin.fileno())