relax KVM agent setup to allow non-bridge traffic labels

(guest bridges are created on physical device, no need for bridge traffic label)
This commit is contained in:
Marcus Sorensen 2013-11-01 18:16:54 -06:00
parent 918bc74050
commit c2e2f6ce63
2 changed files with 4 additions and 3 deletions

View File

@ -1055,7 +1055,7 @@ ServerResource {
String fname = interfaces[i].getName();
s_logger.debug("matchPifFileInDirectory: file name '"+fname+"'");
if (fname.startsWith("eth") || fname.startsWith("bond")
|| fname.startsWith("vlan") || fname.startsWith("em")
|| fname.startsWith("vlan") || fname.startsWith("vxlan") || fname.startsWith("em")
|| fname.matches("^p\\d+p\\d+.*")) {
return fname;
}

View File

@ -96,8 +96,9 @@ class networkConfigBase:
return False
if self.syscfg.env.bridgeType == "openvswitch" and not self.netcfg.isOvsBridge(br):
raise CloudInternalException("%s is not an openvswitch bridge" % br)
if self.syscfg.env.bridgeType == "native" and not self.netcfg.isBridge(br):
raise CloudInternalException("%s is not a bridge" % br)
if self.syscfg.env.bridgeType == "native" and not self.netcfg.isBridge(br) and not self.netcfg.isNetworkDev(br):
# traffic label doesn't have to be a bridge, we'll create bridges on it
raise CloudInternalException("%s is not a bridge and not a net device" % br)
preCfged = True
return preCfged