Skip to content

Commit

Permalink
several naming corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Daan Hoogland committed Sep 30, 2021
1 parent baf8698 commit d9c2847
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5385,7 +5385,7 @@ public Outcome<VirtualMachine> migrateVmThroughJobQueue(final String vmUuid, fin
Map<Volume, StoragePool> volumeStorageMap = dest.getStorageForDisks();
if (volumeStorageMap != null) {
for (Volume vol : volumeStorageMap.keySet()) {
checkConcurrentJobsPerDatastoreThreshhold(volumeStorageMap.get(vol));
checkConcurrentJobsPerDatastoreThreshold(volumeStorageMap.get(vol));
}
}

Expand Down Expand Up @@ -5550,7 +5550,7 @@ public Outcome<VirtualMachine> migrateVmForScaleThroughJobQueue(
return new VmJobVirtualMachineOutcome(workJob, vm.getId());
}

private void checkConcurrentJobsPerDatastoreThreshhold(final StoragePool destPool) {
private void checkConcurrentJobsPerDatastoreThreshold(final StoragePool destPool) {
final Long threshold = VolumeApiService.ConcurrentMigrationsThresholdPerDatastore.value();
if (threshold != null && threshold > 0) {
long count = _jobMgr.countPendingJobs("\"storageid\":\"" + destPool.getUuid() + "\"", MigrateVMCmd.class.getName(), MigrateVolumeCmd.class.getName(), MigrateVolumeCmdByAdmin.class.getName());
Expand All @@ -5571,7 +5571,7 @@ public Outcome<VirtualMachine> migrateVmStorageThroughJobQueue(
Set<Long> uniquePoolIds = new HashSet<>(poolIds);
for (Long poolId : uniquePoolIds) {
StoragePoolVO pool = _storagePoolDao.findById(poolId);
checkConcurrentJobsPerDatastoreThreshhold(pool);
checkConcurrentJobsPerDatastoreThreshold(pool);
}

final VMInstanceVO vm = _vmDao.findByUuid(vmUuid);
Expand Down Expand Up @@ -5625,7 +5625,7 @@ public Outcome<VirtualMachine> addVmToNetworkThroughJobQueue(
if (pendingWorkJobs.size() > 0) {
s_logger.warn(String.format("number of jobs to add net %s to vm %s are %d", network.getUuid(), vm.getInstanceName(), pendingWorkJobs.size()));
}
workJob = fetchOrCreateVmWorkJobToAddNetwokr(vm, network, requested, context, user, account, pendingWorkJobs);
workJob = fetchOrCreateVmWorkJobToAddNetwork(vm, network, requested, context, user, account, pendingWorkJobs);
} else {
if (s_logger.isTraceEnabled()) {
s_logger.trace(String.format("no jobs to add network %s for vm %s yet", network, vm));
Expand All @@ -5638,7 +5638,7 @@ public Outcome<VirtualMachine> addVmToNetworkThroughJobQueue(
return new VmJobVirtualMachineOutcome(workJob, vm.getId());
}

private VmWorkJobVO fetchOrCreateVmWorkJobToAddNetwokr(
private VmWorkJobVO fetchOrCreateVmWorkJobToAddNetwork(
VirtualMachine vm,
Network network,
NicProfile requested,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -792,4 +792,4 @@ ALTER TABLE cloud_usage.usage_network DROP PRIMARY KEY, ADD PRIMARY KEY (`accoun
ALTER TABLE `cloud`.`user_statistics` DROP INDEX `account_id`, ADD UNIQUE KEY `account_id` (`account_id`,`data_center_id`,`public_ip_address`,`device_id`,`device_type`, `network_id`);
ALTER TABLE `cloud_usage`.`user_statistics` DROP INDEX `account_id`, ADD UNIQUE KEY `account_id` (`account_id`,`data_center_id`,`public_ip_address`,`device_id`,`device_type`, `network_id`);

ALTER TABLE `cloud`.`vm_work_job` ADD COLUMN `secondary_object` char(100) COMMENT 'any additional item that must be checked during queueing' AFTER `vm_instance_id`;
ALTER TABLE `cloud`.`vm_work_job` ADD COLUMN `secondary_object` char(100) COMMENT 'any additional item that must be checked during queueing' AFTER `vm_instance_id`;

0 comments on commit d9c2847

Please sign in to comment.