mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixed few coverity issues
This commit is contained in:
parent
354756219c
commit
f9e11540c7
@ -100,7 +100,7 @@ public class PropertiesStorage implements StorageComponent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
public synchronized String getName() {
|
||||
return _name;
|
||||
}
|
||||
|
||||
|
||||
@ -3988,11 +3988,14 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
s_logger.debug("Creating VLAN " + tag + " on host " + _host.ip + " on device " + nPifr.device);
|
||||
}
|
||||
VLAN vlan = VLAN.create(conn, nPif, tag, vlanNetwork);
|
||||
VLAN.Record vlanr = vlan.getRecord(conn);
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("VLAN is created for " + tag + ". The uuid is " + vlanr.uuid);
|
||||
if (vlan != null) {
|
||||
VLAN.Record vlanr = vlan.getRecord(conn);
|
||||
if (vlanr != null) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("VLAN is created for " + tag + ". The uuid is " + vlanr.uuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return vlanNetwork;
|
||||
}
|
||||
|
||||
|
||||
@ -278,10 +278,11 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi
|
||||
// Calculate CPU and RAM capacities
|
||||
// get all hosts...even if they are not in 'UP' state
|
||||
List<HostVO> hosts = _resourceMgr.listAllNotInMaintenanceHostsInOneZone(Host.Type.Routing, null);
|
||||
for (HostVO host : hosts) {
|
||||
_capacityMgr.updateCapacityForHost(host);
|
||||
if (hosts != null) {
|
||||
for (HostVO host : hosts) {
|
||||
_capacityMgr.updateCapacityForHost(host);
|
||||
}
|
||||
}
|
||||
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Done executing cpu/ram capacity update");
|
||||
s_logger.debug("Executing storage capacity update");
|
||||
|
||||
@ -1600,7 +1600,9 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
|
||||
if (implementedNetwork == null || implementedNetwork.first() == null) {
|
||||
s_logger.warn("Failed to implement the network " + guestNetwork);
|
||||
}
|
||||
guestNetwork = implementedNetwork.second();
|
||||
if (implementedNetwork != null) {
|
||||
guestNetwork = implementedNetwork.second();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.warn("Failed to implement network " + guestNetwork + " elements and resources as a part of" + " network provision due to ", ex);
|
||||
CloudRuntimeException e = new CloudRuntimeException("Failed to implement network (with specified id)"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user