address comments

This commit is contained in:
Pearl Dsilva 2026-02-04 09:53:47 -05:00
parent 1c18ca8f7a
commit 778bbaf9cc
8 changed files with 18 additions and 13 deletions

View File

@ -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);

View File

@ -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 {

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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<Long, Long> zoneId : gslbSiteIds) {
if (zoneId.first() == null) {
logger.warn("Skipping GSLB configuration for zone with null ID");
continue;
}
List<SiteLoadBalancerConfig> slbs = new ArrayList<SiteLoadBalancerConfig>();
// set site as 'local' for the site in that zone
for (Pair<Long, Long> 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);

View File

@ -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,