cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #01364
[Merge] ~smoser/cloud-init:oracle-block-device-mapping into cloud-init:master
Scott Moser has proposed merging ~smoser/cloud-init:oracle-block-device-mapping into cloud-init:master.
Requested reviews:
cloud init development team (cloud-init-dev)
For more details, see:
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/310371
--
Your team cloud init development team is requested to review the proposed merge of ~smoser/cloud-init:oracle-block-device-mapping into cloud-init:master.
diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py
index bc84ef5..bb6d6fd 100644
--- a/cloudinit/sources/DataSourceEc2.py
+++ b/cloudinit/sources/DataSourceEc2.py
@@ -151,6 +151,10 @@ class DataSourceEc2(sources.DataSource):
# 'root': '/dev/sda1'}
found = None
bdm = self.metadata['block-device-mapping']
+ if not isinstance(bdm, dict):
+ LOG.debug("block-device-mapping not a dictionary: '%s'", bdm)
+ return None
+
for (entname, device) in bdm.items():
if entname == name:
found = device
Follow ups