[Bug 1492468] Re: ConfigDrive fails to provision when network interface key is "interfaces"
Ben Howard
ben.howard at canonical.com
Fri Sep 4 22:03:35 UTC 2015
Simple fix:
--- cloud-init-0.6.3.orig/cloudinit/DataSourceConfigDrive.py
+++ cloud-init-0.6.3/cloudinit/DataSourceConfigDrive.py
@@ -198,8 +198,14 @@
LOG.debug("Updating network interfaces from config drive (%s)",
dsmode)
- util.write_file("/etc/network/interfaces",
- md['network-interfaces'])
+ # Look at network-interfaces first and then use interfaces
+ # to support OpenNimbula clouds.
+ for iname in ("network-interfaces", "interfaces"):
+ iface_def = md.get(iname, None)
+ if iface_def is not None:
+ util.write_file("/etc/network/interfaces", iface_def)
+ break
+
try:
(out, err) = util.subp(['ifup', '--all'])
if len(out) or len(err):
** Description changed:
- ConfigDrive fails to provision when network interface key is
- "interfaces"
+ The ConfigDrive datasource fails to provision on OpenNimbula clouds that
+ use "interfaces" rather than "network-interfaces". This is only seen on
+ 12.04.
meta_data.json:
{
- "domain": "foobar.com",
- "files": [
- []
- ],
- "hostname": "utl-precise-0904-88f2e9",
- "meta": {
- "dsmode": "net"
- },
- "name": "utl-precise-0904-88f2e9",
- "network_config": {
- "content_path": "/content/interfaces"
- },
- "public_keys": {
- "177313": "<REDACTED FOR READABILITY>"
- },
- "uuid": "9ba148b1-74d2-7f3f-2e8d-68746513d09f"
+ "domain": "foobar.com",
+ "files": [
+ []
+ ],
+ "hostname": "utl-precise-0904-88f2e9",
+ "meta": {
+ "dsmode": "net"
+ },
+ "name": "utl-precise-0904-88f2e9",
+ "network_config": {
+ "content_path": "/content/interfaces"
+ },
+ "public_keys": {
+ "177313": "<REDACTED FOR READABILITY>"
+ },
+ "uuid": "9ba148b1-74d2-7f3f-2e8d-68746513d09f"
}
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1492468
Title:
ConfigDrive fails to provision when network interface key is
"interfaces"
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1492468/+subscriptions
More information about the Ubuntu-server-bugs
mailing list