← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~toabctl/cloud-init:improve-error-msg-for-convert-network_data.json into cloud-init:master


Thomas Bechtold has proposed merging ~toabctl/cloud-init:improve-error-msg-for-convert-network_data.json into cloud-init:master.

Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
Your team cloud-init commiters is requested to review the proposed merge of ~toabctl/cloud-init:improve-error-msg-for-convert-network_data.json into cloud-init:master.
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py
index 9c29cea..1bafec8 100644
--- a/cloudinit/sources/helpers/openstack.py
+++ b/cloudinit/sources/helpers/openstack.py
@@ -666,7 +666,8 @@ def convert_net_json(network_json=None, known_macs=None):
             if not mac:
                 raise ValueError("No mac_address or name entry for %s" % d)
             if mac not in known_macs:
-                raise ValueError("Unable to find a system nic for %s" % d)
+                raise ValueError("Unable to find a system nic for MAC %s. "
+                                 "Only have %s" % (mac, known_macs))
             d['name'] = known_macs[mac]
         for cfg, key, fmt, target in link_updates:

Follow ups