diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-10-05 13:38:54 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-10-05 13:38:54 -0700 |
commit | ffa19cbd80ba10453f0ef448c1c10dbcbf5be504 (patch) | |
tree | c29ffbc5f58a22ba85a584e86b3cf58c1f30d316 /cloudinit/sources/DataSourceEc2.py | |
parent | cb30e7ed56e2c26e654d1703d3f44495a160c6eb (diff) | |
download | vyos-cloud-init-ffa19cbd80ba10453f0ef448c1c10dbcbf5be504.tar.gz vyos-cloud-init-ffa19cbd80ba10453f0ef448c1c10dbcbf5be504.zip |
Ensure that config drive datasource attempts to
translate the device name to a actual device using
logic that will try the ec2 metadata (if avail) or
will try using 'blkid' to find a corresponding label.
LP: #1062540
Diffstat (limited to 'cloudinit/sources/DataSourceEc2.py')
-rw-r--r-- | cloudinit/sources/DataSourceEc2.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py index c7ad6d54..3686fa10 100644 --- a/cloudinit/sources/DataSourceEc2.py +++ b/cloudinit/sources/DataSourceEc2.py @@ -151,22 +151,6 @@ class DataSourceEc2(sources.DataSource): self.metadata_address = url2base.get(url) return bool(url) - def _remap_device(self, short_name): - # LP: #611137 - # the metadata service may believe that devices are named 'sda' - # when the kernel named them 'vda' or 'xvda' - # we want to return the correct value for what will actually - # exist in this instance - mappings = {"sd": ("vd", "xvd")} - for (nfrom, tlist) in mappings.iteritems(): - if not short_name.startswith(nfrom): - continue - for nto in tlist: - cand = "/dev/%s%s" % (nto, short_name[len(nfrom):]) - if os.path.exists(cand): - return cand - return None - def device_name_to_device(self, name): # Consult metadata service, that has # ephemeral0: sdb |