diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/UpdateBackupOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/UpdateBackupOfferingCmd.java index 9657722a208..7d3cc2a3dd2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/UpdateBackupOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/UpdateBackupOfferingCmd.java @@ -83,8 +83,8 @@ public class UpdateBackupOfferingCmd extends BaseCmd { public void execute() { try { if (StringUtils.isAllEmpty(getName(), getDescription()) && getAllowUserDrivenBackups() == null) { - throw new InvalidParameterValueException(String.format("Can't update Backup Offering [id: %s] because there are no parameters to be updated, at least one of the " + - "following should be informed: name, description or allowUserDrivenBackups.", id)); + throw new InvalidParameterValueException(String.format("Can't update Backup Offering [id: %s] because there are no parameters to be updated," + + " at least one of the following should be informed: name, description or allowUserDrivenBackups.", id)); } BackupOffering result = backupManager.updateBackupOffering(this); diff --git a/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentAttache.java b/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentAttache.java index b6509f9a700..3b27007cbff 100644 --- a/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentAttache.java +++ b/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentAttache.java @@ -352,7 +352,8 @@ public abstract class AgentAttache { return false; } AgentAttache that = (AgentAttache)obj; - return _id == that._id; + return Objects.equals(_uuid, that._uuid) && + Objects.equals(_name, that._name); } public void send(final Request req, final Listener listener) throws AgentUnavailableException { @@ -500,7 +501,7 @@ public abstract class AgentAttache { @Override public int hashCode() { - return Objects.hash(_id, _uuid, _name); + return Objects.hash(_uuid, _name); } protected class Alarm extends ManagedContextRunnable { diff --git a/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java index 77eb695ed58..3225fb64d5b 100755 --- a/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java @@ -1730,7 +1730,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac } catch (final OperationTimedoutException e) { throw new AgentUnavailableException(String.format("Unable to stop vm [%s] because the operation to stop timed out", vmUuid), e.getAgentId(), e); } catch (final ConcurrentOperationException e) { - throw new CloudRuntimeException(String.format("Unable to stop vm: %s because of a concurrent operation", vmUuid), e); + throw new CloudRuntimeException(String.format("Unable to stop vm [%s] because of a concurrent operation", vmUuid), e); } } diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/DatabaseAccessObject.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/DatabaseAccessObject.java index 04fefe8b279..822abeef553 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/DatabaseAccessObject.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/DatabaseAccessObject.java @@ -98,7 +98,7 @@ public class DatabaseAccessObject { return true; } } catch (SQLException e) { - logger.debug(String.format("Index %s doesn't exist, ignoring exception:", indexName), e.getMessage()); + logger.debug("Index {} doesn't exist, ignoring exception: {}", indexName, e.getMessage()); } return false; } diff --git a/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/XenServerGuru.java b/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/XenServerGuru.java index 5e04e38a587..373bcce5cb2 100644 --- a/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/XenServerGuru.java +++ b/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/XenServerGuru.java @@ -182,9 +182,7 @@ public class XenServerGuru extends HypervisorGuruBase implements HypervisorGuru, return defaultHostToExecuteCommands; } if (cmd instanceof StorageSubSystemCommand) { - if (logger.isTraceEnabled()) { - logger.trace(String.format("XenServer StrorageSubSystemCommand is always executed in sequence (command of type %s to host %s).", cmd.getClass(), hostId)); - } + logger.trace("XenServer StrorageSubSystemCommand is always executed in sequence (command of type {} to host {}).", cmd.getClass(), hostId); StorageSubSystemCommand c = (StorageSubSystemCommand)cmd; c.setExecuteInSequence(true); } diff --git a/server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java b/server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java index 82a723a4898..52320f3589b 100644 --- a/server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java +++ b/server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java @@ -1038,9 +1038,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements Configur final VMInstanceVO vm = _instanceDao.findById(work.getInstanceId()); try { if (vm != null && !VmHaEnabled.valueIn(vm.getDataCenterId())) { - if (logger.isDebugEnabled()) { - logger.debug("VM high availability manager is disabled, rescheduling the HA work {}, for the VM {} (id: {}) to retry later in case VM high availability manager is enabled on retry attempt", work, vm.getName(), vm.getId()); - } + logger.debug("VM high availability manager is disabled, rescheduling the HA work {}, for the VM {} (id: {}) to retry later in case VM high availability manager is enabled on retry attempt", work, vm.getName(), vm.getId()); long nextTime = getRescheduleTime(wt); rescheduleWork(work, nextTime); return; diff --git a/server/src/main/java/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java b/server/src/main/java/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java index 05a5215ee2b..fe31e2b233d 100644 --- a/server/src/main/java/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java +++ b/server/src/main/java/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java @@ -668,10 +668,18 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR // loop through all the zones, participating in GSLB, and send GSLB config command // to the corresponding GSLB service provider in that zone for (Pair zoneId : gslbSiteIds) { + if (zoneId.first() == null) { + logger.warn("Skipping GSLB configuration for zone with null ID"); + continue; + } List slbs = new ArrayList(); // set site as 'local' for the site in that zone for (Pair innerLoopZoneId : gslbSiteIds) { + if (innerLoopZoneId.first() == null) { + logger.warn("Skipping GSLB configuration for zone with null ID"); + continue; + } SiteLoadBalancerConfig siteLb = zoneSiteLoadbalancerMap.get(innerLoopZoneId.first()); siteLb.setLocal(zoneId.first().equals(innerLoopZoneId.first())); slbs.add(siteLb); diff --git a/tools/marvin/setup.py b/tools/marvin/setup.py index f01863d6989..1ceff3dc204 100644 --- a/tools/marvin/setup.py +++ b/tools/marvin/setup.py @@ -27,7 +27,7 @@ except ImportError: raise RuntimeError("python setuptools is required to build Marvin") -VERSION = "4.20.3.0-SNAPSHOT" +VERSION = "4.20.3.0" setup(name="Marvin", version=VERSION,