You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/03/26 15:43:10 UTC
[1/4] git commit: updated refs/heads/master to 042b99f
Repository: cloudstack
Updated Branches:
refs/heads/master 0eec4ff97 -> 042b99f6b
findbugs: Boolen function should not return null
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/048212b1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/048212b1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/048212b1
Branch: refs/heads/master
Commit: 048212b1176158c379fcb9c9a9c9d51784c406e2
Parents: 7246994
Author: Daan Hoogland <dh...@schubergphilis.com>
Authored: Wed Mar 25 21:46:47 2015 +0100
Committer: Daan Hoogland <dh...@schubergphilis.com>
Committed: Wed Mar 25 21:46:47 2015 +0100
----------------------------------------------------------------------
api/src/com/cloud/ha/Investigator.java | 11 ++++++++++-
.../hyperv/src/com/cloud/ha/HypervInvestigator.java | 4 ++--
.../kvm/src/com/cloud/ha/KVMInvestigator.java | 10 +++++++---
.../src/main/java/com/cloud/ha/Ovm3Investigator.java | 4 ++--
.../src/com/cloud/ha/SimulatorInvestigator.java | 8 ++++----
.../vmware/src/com/cloud/ha/VmwareInvestigator.java | 4 ++--
server/src/com/cloud/ha/CheckOnAgentInvestigator.java | 8 ++++----
server/src/com/cloud/ha/HighAvailabilityManagerImpl.java | 10 +++++++---
.../com/cloud/ha/ManagementIPSystemVMInvestigator.java | 10 +++++-----
server/src/com/cloud/ha/UserVmDomRInvestigator.java | 6 +++---
server/src/com/cloud/ha/XenServerInvestigator.java | 10 +++++++---
11 files changed, 53 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/048212b1/api/src/com/cloud/ha/Investigator.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/ha/Investigator.java b/api/src/com/cloud/ha/Investigator.java
index 7dd8b3f..cbf5d30 100644
--- a/api/src/com/cloud/ha/Investigator.java
+++ b/api/src/com/cloud/ha/Investigator.java
@@ -27,7 +27,16 @@ public interface Investigator extends Adapter {
*
* @param vm to work on.
*/
- public Boolean isVmAlive(VirtualMachine vm, Host host);
+ public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM;
public Status isAgentAlive(Host agent);
+
+ class UnknownVM extends Exception {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ };
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/048212b1/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java b/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
index 65498e4..8b94672 100644
--- a/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
+++ b/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
@@ -44,10 +44,10 @@ public class HypervInvestigator extends AdapterBase implements Investigator {
@Inject ResourceManager _resourceMgr;
@Override
- public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) {
+ public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) throws UnknownVM {
Status status = isAgentAlive(host);
if (status == null) {
- return null;
+ throw new UnknownVM();
}
return status == Status.Up ? true : null;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/048212b1/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java b/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
index e750ced..b519312 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
@@ -47,12 +47,16 @@ public class KVMInvestigator extends AdapterBase implements Investigator {
ResourceManager _resourceMgr;
@Override
- public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) {
+ public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) throws UnknownVM {
Status status = isAgentAlive(host);
if (status == null) {
- return null;
+ throw new UnknownVM();
+ }
+ if (status == Status.Up) {
+ return true;
+ } else {
+ throw new UnknownVM();
}
- return status == Status.Up ? true : null;
}
@Override
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/048212b1/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java b/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
index b80661b..56f904b 100644
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
@@ -46,10 +46,10 @@ public class Ovm3Investigator extends AdapterBase implements Investigator {
ResourceManager resourceMgr;
@Override
- public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) {
+ public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) throws UnknownVM {
LOGGER.debug("isVmAlive: " + vm.getHostName() + " on " + host.getName());
if (host.getHypervisorType() != Hypervisor.HypervisorType.Ovm3) {
- return null;
+ throw new UnknownVM();
}
Status status = isAgentAlive(host);
if (status == null) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/048212b1/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java b/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
index 7191ae3..9366b83 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
@@ -80,23 +80,23 @@ public class SimulatorInvestigator extends AdapterBase implements Investigator {
}
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) {
+ public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
CheckVirtualMachineCommand cmd = new CheckVirtualMachineCommand(vm.getInstanceName());
try {
Answer answer = _agentMgr.send(vm.getHostId(), cmd);
if (!answer.getResult()) {
s_logger.debug("Unable to get vm state on " + vm.toString());
- return null;
+ throw new UnknownVM();
}
CheckVirtualMachineAnswer cvmAnswer = (CheckVirtualMachineAnswer)answer;
s_logger.debug("Agent responded with state " + cvmAnswer.getState().toString());
return cvmAnswer.getState() == PowerState.PowerOn;
} catch (AgentUnavailableException e) {
s_logger.debug("Unable to reach the agent for " + vm.toString() + ": " + e.getMessage());
- return null;
+ throw new UnknownVM();
} catch (OperationTimedoutException e) {
s_logger.debug("Operation timed out for " + vm.toString() + ": " + e.getMessage());
- return null;
+ throw new UnknownVM();
}
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/048212b1/plugins/hypervisors/vmware/src/com/cloud/ha/VmwareInvestigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/ha/VmwareInvestigator.java b/plugins/hypervisors/vmware/src/com/cloud/ha/VmwareInvestigator.java
index 7042d53..0fda96a 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/ha/VmwareInvestigator.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/ha/VmwareInvestigator.java
@@ -38,10 +38,10 @@ public class VmwareInvestigator extends AdapterBase implements Investigator {
}
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) {
+ public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
if (vm.getHypervisorType() == HypervisorType.VMware)
return true;
- return null;
+ throw new UnknownVM();
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/048212b1/server/src/com/cloud/ha/CheckOnAgentInvestigator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/CheckOnAgentInvestigator.java b/server/src/com/cloud/ha/CheckOnAgentInvestigator.java
index b361199..fdb587b 100644
--- a/server/src/com/cloud/ha/CheckOnAgentInvestigator.java
+++ b/server/src/com/cloud/ha/CheckOnAgentInvestigator.java
@@ -47,23 +47,23 @@ public class CheckOnAgentInvestigator extends AdapterBase implements Investigato
}
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) {
+ public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
CheckVirtualMachineCommand cmd = new CheckVirtualMachineCommand(vm.getInstanceName());
try {
CheckVirtualMachineAnswer answer = (CheckVirtualMachineAnswer)_agentMgr.send(vm.getHostId(), cmd);
if (!answer.getResult()) {
s_logger.debug("Unable to get vm state on " + vm.toString());
- return null;
+ throw new UnknownVM();
}
s_logger.debug("Agent responded with state " + answer.getState().toString());
return answer.getState() == PowerState.PowerOn;
} catch (AgentUnavailableException e) {
s_logger.debug("Unable to reach the agent for " + vm.toString() + ": " + e.getMessage());
- return null;
+ throw new UnknownVM();
} catch (OperationTimedoutException e) {
s_logger.debug("Operation timed out for " + vm.toString() + ": " + e.getMessage());
- return null;
+ throw new UnknownVM();
}
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/048212b1/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
index 7cc63df..f15889d 100644
--- a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
+++ b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
@@ -55,6 +55,7 @@ import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.InsufficientServerCapacityException;
import com.cloud.exception.OperationTimedoutException;
import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.ha.Investigator.UnknownVM;
import com.cloud.ha.dao.HighAvailabilityDao;
import com.cloud.host.Host;
import com.cloud.host.HostVO;
@@ -481,10 +482,13 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai
Investigator investigator = null;
for (Investigator it : investigators) {
investigator = it;
- alive = investigator.isVmAlive(vm, host);
- s_logger.info(investigator.getName() + " found " + vm + "to be alive? " + alive);
- if (alive != null) {
+ try
+ {
+ alive = investigator.isVmAlive(vm, host);
+ s_logger.info(investigator.getName() + " found " + vm + " to be alive? " + alive);
break;
+ } catch (UnknownVM e) {
+ s_logger.info(investigator.getName() + " could not find " + vm);
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/048212b1/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java b/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java
index 95e803f..3f1b17f 100644
--- a/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java
+++ b/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java
@@ -42,7 +42,7 @@ public class ManagementIPSystemVMInvestigator extends AbstractInvestigatorImpl {
private final NetworkModel _networkMgr = null;
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) {
+ public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
if (!vm.getType().isUsedBySystem()) {
s_logger.debug("Not a System Vm, unable to determine state of " + vm + " returning null");
}
@@ -53,13 +53,13 @@ public class ManagementIPSystemVMInvestigator extends AbstractInvestigatorImpl {
if (vm.getHostId() == null) {
s_logger.debug("There's no host id for " + vm);
- return null;
+ throw new UnknownVM();
}
HostVO vmHost = _hostDao.findById(vm.getHostId());
if (vmHost == null) {
s_logger.debug("Unable to retrieve the host by using id " + vm.getHostId());
- return null;
+ throw new UnknownVM();
}
List<? extends Nic> nics = _networkMgr.getNicsForTraffic(vm.getId(), TrafficType.Management);
@@ -67,7 +67,7 @@ public class ManagementIPSystemVMInvestigator extends AbstractInvestigatorImpl {
if (s_logger.isDebugEnabled()) {
s_logger.debug("Unable to find a management nic, cannot ping this system VM, unable to determine state of " + vm + " returning null");
}
- return null;
+ throw new UnknownVM();
}
for (Nic nic : nics) {
@@ -105,7 +105,7 @@ public class ManagementIPSystemVMInvestigator extends AbstractInvestigatorImpl {
if (s_logger.isDebugEnabled()) {
s_logger.debug("unable to determine state of " + vm + " returning null");
}
- return null;
+ throw new UnknownVM();
}
@Override
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/048212b1/server/src/com/cloud/ha/UserVmDomRInvestigator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/UserVmDomRInvestigator.java b/server/src/com/cloud/ha/UserVmDomRInvestigator.java
index d6f7279..b3a5ec1 100644
--- a/server/src/com/cloud/ha/UserVmDomRInvestigator.java
+++ b/server/src/com/cloud/ha/UserVmDomRInvestigator.java
@@ -53,12 +53,12 @@ public class UserVmDomRInvestigator extends AbstractInvestigatorImpl {
private final VpcVirtualNetworkApplianceManager _vnaMgr = null;
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) {
+ public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
if (vm.getType() != VirtualMachine.Type.User) {
if (s_logger.isDebugEnabled()) {
s_logger.debug("Not a User Vm, unable to determine state of " + vm + " returning null");
}
- return null;
+ throw new UnknownVM();
}
if (s_logger.isDebugEnabled()) {
@@ -100,7 +100,7 @@ public class UserVmDomRInvestigator extends AbstractInvestigatorImpl {
if (s_logger.isDebugEnabled()) {
s_logger.debug("Returning null since we're unable to determine state of " + vm);
}
- return null;
+ throw new UnknownVM();
}
@Override
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/048212b1/server/src/com/cloud/ha/XenServerInvestigator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/XenServerInvestigator.java b/server/src/com/cloud/ha/XenServerInvestigator.java
index cce449c..b6549f8 100644
--- a/server/src/com/cloud/ha/XenServerInvestigator.java
+++ b/server/src/com/cloud/ha/XenServerInvestigator.java
@@ -77,11 +77,15 @@ public class XenServerInvestigator extends AdapterBase implements Investigator {
}
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) {
+ public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
Status status = isAgentAlive(host);
if (status == null) {
- return null;
+ throw new UnknownVM();
+ }
+ if (status == Status.Up) {
+ return true;
+ } else {
+ throw new UnknownVM();
}
- return status == Status.Up ? true : null;
}
}
[3/4] git commit: updated refs/heads/master to 042b99f
Posted by da...@apache.org.
Boolean -> boolean
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6a821730
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6a821730
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6a821730
Branch: refs/heads/master
Commit: 6a821730cea7720d44e5f7293ed340a1b290c90c
Parents: de44458
Author: Daan Hoogland <dh...@schubergphilis.com>
Authored: Wed Mar 25 22:20:40 2015 +0100
Committer: Daan Hoogland <dh...@schubergphilis.com>
Committed: Wed Mar 25 22:20:40 2015 +0100
----------------------------------------------------------------------
api/src/com/cloud/ha/Investigator.java | 2 +-
.../hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java | 2 +-
plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java | 2 +-
.../ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java | 2 +-
.../simulator/src/com/cloud/ha/SimulatorInvestigator.java | 2 +-
.../hypervisors/vmware/src/com/cloud/ha/VmwareInvestigator.java | 2 +-
server/src/com/cloud/ha/CheckOnAgentInvestigator.java | 2 +-
server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java | 2 +-
server/src/com/cloud/ha/UserVmDomRInvestigator.java | 2 +-
server/src/com/cloud/ha/XenServerInvestigator.java | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a821730/api/src/com/cloud/ha/Investigator.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/ha/Investigator.java b/api/src/com/cloud/ha/Investigator.java
index bc6f331..88d802a 100644
--- a/api/src/com/cloud/ha/Investigator.java
+++ b/api/src/com/cloud/ha/Investigator.java
@@ -27,7 +27,7 @@ public interface Investigator extends Adapter {
*
* @param vm to work on.
*/
- public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM;
+ public boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM;
public Status isAgentAlive(Host agent);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a821730/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java b/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
index 8b94672..634f242 100644
--- a/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
+++ b/plugins/hypervisors/hyperv/src/com/cloud/ha/HypervInvestigator.java
@@ -44,7 +44,7 @@ public class HypervInvestigator extends AdapterBase implements Investigator {
@Inject ResourceManager _resourceMgr;
@Override
- public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) throws UnknownVM {
+ public boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) throws UnknownVM {
Status status = isAgentAlive(host);
if (status == null) {
throw new UnknownVM();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a821730/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java b/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
index b519312..43cc71d 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
@@ -47,7 +47,7 @@ public class KVMInvestigator extends AdapterBase implements Investigator {
ResourceManager _resourceMgr;
@Override
- public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) throws UnknownVM {
+ public boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) throws UnknownVM {
Status status = isAgentAlive(host);
if (status == null) {
throw new UnknownVM();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a821730/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java b/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
index 56f904b..f9e88c0 100644
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/ha/Ovm3Investigator.java
@@ -46,7 +46,7 @@ public class Ovm3Investigator extends AdapterBase implements Investigator {
ResourceManager resourceMgr;
@Override
- public Boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) throws UnknownVM {
+ public boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host) throws UnknownVM {
LOGGER.debug("isVmAlive: " + vm.getHostName() + " on " + host.getName());
if (host.getHypervisorType() != Hypervisor.HypervisorType.Ovm3) {
throw new UnknownVM();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a821730/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java b/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
index 9366b83..bc55ba3 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/ha/SimulatorInvestigator.java
@@ -80,7 +80,7 @@ public class SimulatorInvestigator extends AdapterBase implements Investigator {
}
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
+ public boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
CheckVirtualMachineCommand cmd = new CheckVirtualMachineCommand(vm.getInstanceName());
try {
Answer answer = _agentMgr.send(vm.getHostId(), cmd);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a821730/plugins/hypervisors/vmware/src/com/cloud/ha/VmwareInvestigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/ha/VmwareInvestigator.java b/plugins/hypervisors/vmware/src/com/cloud/ha/VmwareInvestigator.java
index 0fda96a..3f7a05c 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/ha/VmwareInvestigator.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/ha/VmwareInvestigator.java
@@ -38,7 +38,7 @@ public class VmwareInvestigator extends AdapterBase implements Investigator {
}
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
+ public boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
if (vm.getHypervisorType() == HypervisorType.VMware)
return true;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a821730/server/src/com/cloud/ha/CheckOnAgentInvestigator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/CheckOnAgentInvestigator.java b/server/src/com/cloud/ha/CheckOnAgentInvestigator.java
index fdb587b..b2e333f 100644
--- a/server/src/com/cloud/ha/CheckOnAgentInvestigator.java
+++ b/server/src/com/cloud/ha/CheckOnAgentInvestigator.java
@@ -47,7 +47,7 @@ public class CheckOnAgentInvestigator extends AdapterBase implements Investigato
}
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
+ public boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
CheckVirtualMachineCommand cmd = new CheckVirtualMachineCommand(vm.getInstanceName());
try {
CheckVirtualMachineAnswer answer = (CheckVirtualMachineAnswer)_agentMgr.send(vm.getHostId(), cmd);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a821730/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java b/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java
index 3f1b17f..5db5b9c 100644
--- a/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java
+++ b/server/src/com/cloud/ha/ManagementIPSystemVMInvestigator.java
@@ -42,7 +42,7 @@ public class ManagementIPSystemVMInvestigator extends AbstractInvestigatorImpl {
private final NetworkModel _networkMgr = null;
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
+ public boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
if (!vm.getType().isUsedBySystem()) {
s_logger.debug("Not a System Vm, unable to determine state of " + vm + " returning null");
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a821730/server/src/com/cloud/ha/UserVmDomRInvestigator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/UserVmDomRInvestigator.java b/server/src/com/cloud/ha/UserVmDomRInvestigator.java
index b3a5ec1..6084e76 100644
--- a/server/src/com/cloud/ha/UserVmDomRInvestigator.java
+++ b/server/src/com/cloud/ha/UserVmDomRInvestigator.java
@@ -53,7 +53,7 @@ public class UserVmDomRInvestigator extends AbstractInvestigatorImpl {
private final VpcVirtualNetworkApplianceManager _vnaMgr = null;
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
+ public boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
if (vm.getType() != VirtualMachine.Type.User) {
if (s_logger.isDebugEnabled()) {
s_logger.debug("Not a User Vm, unable to determine state of " + vm + " returning null");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a821730/server/src/com/cloud/ha/XenServerInvestigator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/ha/XenServerInvestigator.java b/server/src/com/cloud/ha/XenServerInvestigator.java
index b6549f8..07eb76b 100644
--- a/server/src/com/cloud/ha/XenServerInvestigator.java
+++ b/server/src/com/cloud/ha/XenServerInvestigator.java
@@ -77,7 +77,7 @@ public class XenServerInvestigator extends AdapterBase implements Investigator {
}
@Override
- public Boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
+ public boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM {
Status status = isAgentAlive(host);
if (status == null) {
throw new UnknownVM();
[2/4] git commit: updated refs/heads/master to 042b99f
Posted by da...@apache.org.
trailing whitespace
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/de444584
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/de444584
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/de444584
Branch: refs/heads/master
Commit: de4445845ee4f39d22db6558d8d22752b5c13aad
Parents: 048212b
Author: Daan Hoogland <dh...@schubergphilis.com>
Authored: Wed Mar 25 22:06:26 2015 +0100
Committer: Daan Hoogland <dh...@schubergphilis.com>
Committed: Wed Mar 25 22:06:26 2015 +0100
----------------------------------------------------------------------
api/src/com/cloud/ha/Investigator.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/de444584/api/src/com/cloud/ha/Investigator.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/ha/Investigator.java b/api/src/com/cloud/ha/Investigator.java
index cbf5d30..bc6f331 100644
--- a/api/src/com/cloud/ha/Investigator.java
+++ b/api/src/com/cloud/ha/Investigator.java
@@ -34,7 +34,7 @@ public interface Investigator extends Adapter {
class UnknownVM extends Exception {
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
[4/4] git commit: updated refs/heads/master to 042b99f
Posted by da...@apache.org.
Merge branch 'hotfix/findbugs-unknownvm-as-null' of https://github.com/DaanHoogland/cloudstack
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/042b99f6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/042b99f6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/042b99f6
Branch: refs/heads/master
Commit: 042b99f6bc8f8663c2ede88b07cee2bca3ce3d01
Parents: 0eec4ff 6a82173
Author: Daan Hoogland <dh...@schubergphilis.com>
Authored: Thu Mar 26 15:40:20 2015 +0100
Committer: Daan Hoogland <dh...@schubergphilis.com>
Committed: Thu Mar 26 15:40:20 2015 +0100
----------------------------------------------------------------------
api/src/com/cloud/ha/Investigator.java | 11 ++++++++++-
.../hyperv/src/com/cloud/ha/HypervInvestigator.java | 4 ++--
.../kvm/src/com/cloud/ha/KVMInvestigator.java | 10 +++++++---
.../src/main/java/com/cloud/ha/Ovm3Investigator.java | 4 ++--
.../src/com/cloud/ha/SimulatorInvestigator.java | 8 ++++----
.../vmware/src/com/cloud/ha/VmwareInvestigator.java | 4 ++--
server/src/com/cloud/ha/CheckOnAgentInvestigator.java | 8 ++++----
server/src/com/cloud/ha/HighAvailabilityManagerImpl.java | 10 +++++++---
.../com/cloud/ha/ManagementIPSystemVMInvestigator.java | 10 +++++-----
server/src/com/cloud/ha/UserVmDomRInvestigator.java | 6 +++---
server/src/com/cloud/ha/XenServerInvestigator.java | 10 +++++++---
11 files changed, 53 insertions(+), 32 deletions(-)
----------------------------------------------------------------------