mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 10440: ipassoca failed, if the public network is untagged
status 10440: resolved fixed
This commit is contained in:
parent
7feaca1d60
commit
3166b237cb
@ -1008,11 +1008,17 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
||||
OutputInterpreter.OneLineParser vlanIdParser = new OutputInterpreter.OneLineParser();
|
||||
final Script cmd = new Script("/bin/bash", s_logger);
|
||||
cmd.add("-c");
|
||||
cmd.add("vlanid=$(brctl show |grep " + brName + " |awk '{print $4}' | cut -d. -f 2);echo $vlanid");
|
||||
if (cmd.execute(vlanIdParser) != null) {
|
||||
cmd.add("vlanid=$(brctl show |grep " + brName + " |awk '{print $4}' | cut -s -d. -f 2);echo $vlanid");
|
||||
String result = cmd.execute(vlanIdParser);
|
||||
if (result != null) {
|
||||
return null;
|
||||
}
|
||||
return vlanIdParser.getLine();
|
||||
String vlanId = vlanIdParser.getLine();
|
||||
if (vlanId.equalsIgnoreCase("")) {
|
||||
return null;
|
||||
} else {
|
||||
return vlanId;
|
||||
}
|
||||
}
|
||||
|
||||
private void VifHotPlug(Connect conn, String vmName, String vlanId, String macAddr) throws InternalErrorException, LibvirtException {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user