mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Summary: Begone pesky tabs
This commit is contained in:
parent
f09d453efe
commit
2d69a1855d
@ -669,8 +669,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements
|
||||
|
||||
if (_bridgeType == BridgeType.OPENVSWITCH) {
|
||||
if (conn.getLibVirVersion() < (9 * 1000 + 11)) {
|
||||
throw new ConfigurationException(
|
||||
"LibVirt version 0.9.11 required for openvswitch support, but version "
|
||||
throw new ConfigurationException("LibVirt version 0.9.11 required for openvswitch support, but version "
|
||||
+ conn.getLibVirVersion() + " detected");
|
||||
}
|
||||
}
|
||||
@ -720,12 +719,13 @@ public class LibvirtComputingResource extends ServerResourceBase implements
|
||||
}
|
||||
|
||||
switch (_bridgeType) {
|
||||
case NATIVE:
|
||||
getPifs();
|
||||
break;
|
||||
case OPENVSWITCH:
|
||||
getOvsPifs();
|
||||
break;
|
||||
case NATIVE:
|
||||
default:
|
||||
getPifs();
|
||||
break;
|
||||
}
|
||||
|
||||
if (_pifs.get("private") == null) {
|
||||
@ -789,8 +789,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements
|
||||
if (_bridgeType == BridgeType.OPENVSWITCH) {
|
||||
s_logger.info("No libvirt.vif.driver specififed. Defaults to OvsVifDriver.");
|
||||
vifDriverName = "com.cloud.hypervisor.kvm.resource.OvsVifDriver";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
s_logger.info("No libvirt.vif.driver specififed. Defaults to BridgeVifDriver.");
|
||||
vifDriverName = "com.cloud.hypervisor.kvm.resource.BridgeVifDriver";
|
||||
}
|
||||
@ -810,7 +809,6 @@ public class LibvirtComputingResource extends ServerResourceBase implements
|
||||
throw new ConfigurationException("Failed to initialize libvirt.vif.driver " + e);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -840,7 +838,8 @@ public class LibvirtComputingResource extends ServerResourceBase implements
|
||||
for (String bridge : bridges) {
|
||||
s_logger.debug("looking for pif for bridge " + bridge);
|
||||
// String pif = getOvsPif(bridge);
|
||||
// Not really interested in the pif name at this point for ovs bridges
|
||||
// Not really interested in the pif name at this point for ovs
|
||||
// bridges
|
||||
String pif = bridge;
|
||||
if (_publicBridgeName != null && bridge.equals(_publicBridgeName)) {
|
||||
_pifs.put("public", pif);
|
||||
|
||||
@ -36,8 +36,7 @@ import com.cloud.utils.script.OutputInterpreter;
|
||||
import com.cloud.utils.script.Script;
|
||||
|
||||
public class OvsVifDriver extends VifDriverBase {
|
||||
private static final Logger s_logger = Logger
|
||||
.getLogger(OvsVifDriver.class);
|
||||
private static final Logger s_logger = Logger.getLogger(OvsVifDriver.class);
|
||||
private int _timeout;
|
||||
private String _modifyVlanPath;
|
||||
|
||||
@ -174,7 +173,6 @@ public class OvsVifDriver extends VifDriverBase {
|
||||
Script.runSimpleBashScript("ovs-vsctl add-br " + privBrName + "; ifconfig " + privBrName + " up; ifconfig " +
|
||||
privBrName + " 169.254.0.1", _timeout);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private boolean isBridgeExists(String bridgeName) {
|
||||
|
||||
@ -206,8 +206,7 @@ public class Script implements Callable<String> {
|
||||
_logger.debug("Execution is successful.");
|
||||
if (interpreter != null) {
|
||||
return interpreter.drain() ? task.getResult() : interpreter.interpret(ir);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// null return is ok apparently
|
||||
return (_process.exitValue() == 0) ? "Ok" : "Failed, exit code " + _process.exitValue();
|
||||
}
|
||||
@ -216,7 +215,10 @@ public class Script implements Callable<String> {
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
if (!_isTimeOut) {
|
||||
/* This is not timeout, we are interrupted by others, continue */
|
||||
/*
|
||||
* This is not timeout, we are interrupted by others,
|
||||
* continue
|
||||
*/
|
||||
_logger.debug("We are interrupted but it's not a timeout, just continue");
|
||||
continue;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user