summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2010-03-04 15:44:48 -0500
committerScott Moser <smoser@ubuntu.com>2010-03-04 15:44:48 -0500
commit10d99782809706eb0edbaf5d619c4182d3a26065 (patch)
treec6fa7ef62c456d40e11385e6d5db2b4e407940f6 /cloudinit
parent128f3a79a48ae34a9b94c8c6ae638b3ff2a30f28 (diff)
downloadvyos-cloud-init-10d99782809706eb0edbaf5d619c4182d3a26065.tar.gz
vyos-cloud-init-10d99782809706eb0edbaf5d619c4182d3a26065.zip
in ebs root instances, ephemeral0 will have a full path.
In instance store I was used to block-device-mapping: {'ami': 'sda1', 'ephemeral0': 'sda2', 'root': '/dev/sda1', 'swap': 'sda3'}, in ebs, image registered with '--block-device-mapping /dev/sda2=ephemeral0', metadata is showing block-device-mapping: {'ami': '/dev/sda1', 'ephemeral0': '/dev/sda2', 'root': '/dev/sda1', 'swap': 'sda3'}, Without this change, 'ephemeral0' would not get translated and would show up in /etc/fstab.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/CloudConfig.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/CloudConfig.py b/cloudinit/CloudConfig.py
index 73cf4e3a..9eb2d00b 100644
--- a/cloudinit/CloudConfig.py
+++ b/cloudinit/CloudConfig.py
@@ -323,7 +323,9 @@ class CloudConfig():
for defmnt in defmnts:
devname = self.cloud.device_name_to_device(defmnt[0])
if devname is None: continue
- if not devname.startswith("/"):
+ if devname.startswith("/"):
+ defmnt[0] = devname
+ else:
defmnt[0] = "/dev/%s" % devname
cfgmnt_has = False