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
=== modified file 'cloudinit/'
--- cloudinit/ 2016-03-04 06:45:58 +0000
+++ cloudinit/ 2016-04-28 17:13:51 +0000
@@ -375,7 +375,7 @@
375 def _get_ipath(self, name=None):375 def _get_ipath(self, name=None):
376 if not self.datasource:376 if not self.datasource:
377 return None377 return None
378 iid = self.datasource.get_instance_id()378 iid = self.datasource.get_instance_id().replace(os.sep, '_')
379 if iid is None:379 if iid is None:
380 return None380 return None
381 ipath = os.path.join(self.cloud_dir, 'instances', str(iid))381 ipath = os.path.join(self.cloud_dir, 'instances', str(iid))