Merge lp:~rcj/cloud-init/lp1575938 into lp:~cloud-init-dev/cloud-init/trunk

Proposed by Robert C Jennings
Status: Merged
Merged at revision: 1215
Proposed branch: lp:~rcj/cloud-init/lp1575938
Merge into: lp:~cloud-init-dev/cloud-init/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
cloudinit/ (+1/-1)
To merge this branch: bzr merge lp:~rcj/cloud-init/lp1575938
Reviewer Review Type Date Requested Status
cloud-init Commiters Pending
Review via email:
To post a comment you must log in.
lp:~rcj/cloud-init/lp1575938 updated
1214. By Robert C Jennings

Tweak instance path name based on review feedback

r1213 (Ensure instance path is a child of cloud_dir) stripped the
leading path separator. This patch goes further by replacing all
path seperators with '_' which will avoid a deep directory structure
under /var/lib/cloud/instances.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cloudinit/'
2--- cloudinit/ 2016-03-04 06:45:58 +0000
3+++ cloudinit/ 2016-04-28 17:13:51 +0000
4@@ -375,7 +375,7 @@
5 def _get_ipath(self, name=None):
6 if not self.datasource:
7 return None
8- iid = self.datasource.get_instance_id()
9+ iid = self.datasource.get_instance_id().replace(os.sep, '_')
10 if iid is None:
11 return None
12 ipath = os.path.join(self.cloud_dir, 'instances', str(iid))