diff --git a/debian/rules b/debian/rules index de45255d9bd..a19089a1816 100755 --- a/debian/rules +++ b/debian/rules @@ -38,7 +38,7 @@ override_dh_auto_install: mkdir $(DESTDIR)/$(SYSCONFDIR)/profile.d mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent/plugins - install -D agent/target/cloud-agent-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/$(PACKAGE)-agent.jar + mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/ install -D plugins/hypervisors/kvm/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/ diff --git a/plugins/integrations/cloudian/src/main/java/org/apache/cloudstack/cloudian/CloudianConnector.java b/plugins/integrations/cloudian/src/main/java/org/apache/cloudstack/cloudian/CloudianConnector.java index c04d70c2601..30c8b1c1853 100644 --- a/plugins/integrations/cloudian/src/main/java/org/apache/cloudstack/cloudian/CloudianConnector.java +++ b/plugins/integrations/cloudian/src/main/java/org/apache/cloudstack/cloudian/CloudianConnector.java @@ -24,7 +24,7 @@ import com.cloud.utils.component.PluggableService; public interface CloudianConnector extends PluggableService { ConfigKey CloudianConnectorEnabled = new ConfigKey<>("Advanced", Boolean.class, "cloudian.connector.enabled", "false", - "If set to true, this enables the Cloudian Connector for CloudStack.", true); + "If set to true, this enables the Cloudian Connector for CloudStack.", false); ConfigKey CloudianAdminHost = new ConfigKey<>("Advanced", String.class, "cloudian.admin.host", "s3-admin.cloudian.com", "The hostname of the Cloudian Admin server.", true); diff --git a/server/src/main/java/com/cloud/server/StatsCollector.java b/server/src/main/java/com/cloud/server/StatsCollector.java index d78a10607ba..0da1d78c224 100644 --- a/server/src/main/java/com/cloud/server/StatsCollector.java +++ b/server/src/main/java/com/cloud/server/StatsCollector.java @@ -1021,14 +1021,22 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc if (answer != null && answer.getResult()) { storagePoolStats.put(pool.getId(), (StorageStats)answer); + boolean poolNeedsUpdating = false; // Seems like we have dynamically updated the pool size since the prev. size and the current do not match - if (pool.getCapacityBytes() != ((StorageStats)answer).getCapacityBytes() || - pool.getUsedBytes() != ((StorageStats)answer).getByteUsed()) { - pool.setCapacityBytes(((StorageStats)answer).getCapacityBytes()); - if (pool.getStorageProviderName().equalsIgnoreCase(DataStoreProvider.DEFAULT_PRIMARY)) { - pool.setUsedBytes(((StorageStats) answer).getByteUsed()); - pool.setUpdateTime(new Date()); + if (_storagePoolStats.get(poolId) != null && _storagePoolStats.get(poolId).getCapacityBytes() != ((StorageStats)answer).getCapacityBytes()) { + if (((StorageStats)answer).getCapacityBytes() > 0) { + pool.setCapacityBytes(((StorageStats)answer).getCapacityBytes()); + poolNeedsUpdating = true; + } else { + s_logger.warn("Not setting capacity bytes, received " + ((StorageStats)answer).getCapacityBytes() + " capacity for pool ID " + poolId); } + } + if (pool.getUsedBytes() != ((StorageStats)answer).getByteUsed() && pool.getStorageProviderName().equalsIgnoreCase(DataStoreProvider.DEFAULT_PRIMARY)) { + pool.setUsedBytes(((StorageStats) answer).getByteUsed()); + poolNeedsUpdating = true; + } + if (poolNeedsUpdating) { + pool.setUpdateTime(new Date()); _storagePoolDao.update(pool.getId(), pool); } } diff --git a/ui/src/config/section/offering.js b/ui/src/config/section/offering.js index 1ec2d40d181..64678de2daf 100644 --- a/ui/src/config/section/offering.js +++ b/ui/src/config/section/offering.js @@ -150,7 +150,7 @@ export default { label: 'label.edit', docHelp: 'adminguide/service_offerings.html#modifying-or-deleting-a-service-offering', dataView: true, - args: ['name', 'displaytext'] + args: ['name', 'displaytext', 'tags'] }, { api: 'updateDiskOffering', icon: 'lock', @@ -216,7 +216,7 @@ export default { label: 'label.edit', docHelp: 'adminguide/service_offerings.html#modifying-or-deleting-a-service-offering', dataView: true, - args: ['name', 'displaytext', 'availability'], + args: ['name', 'displaytext', 'availability', 'tags'], mapping: { availability: { options: ['Optional', 'Required'] diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js index c907079864b..976cab9acde 100644 --- a/ui/src/config/section/storage.js +++ b/ui/src/config/section/storage.js @@ -284,7 +284,13 @@ export default { label: 'label.action.create.volume', dataView: true, show: (record) => { return record.state === 'BackedUp' }, - args: ['snapshotid', 'name'], + args: (record, store) => { + var fields = ['snapshotid', 'name'] + if (record.volumetype === 'ROOT') { + fields.push('diskofferingid') + } + return fields + }, mapping: { snapshotid: { value: (record) => { return record.id } diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index 7e14f9e609f..dd92d72468b 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -983,13 +983,13 @@ export default { continue } if (!input === undefined || input === null || - (input === '' && !['updateStoragePool', 'updateHost', 'updatePhysicalNetwork'].includes(action.api))) { + (input === '' && !['updateStoragePool', 'updateHost', 'updatePhysicalNetwork', 'updateDiskOffering', 'updateNetworkOffering'].includes(action.api))) { if (param.type === 'boolean') { params[key] = false } break } - if (!input) { + if (!input && input !== 0 && !['tags'].includes(key)) { continue } if (action.mapping && key in action.mapping && action.mapping[key].options) { diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index 8c0b81c5967..c0965bfd593 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -106,7 +106,11 @@ @update-template-iso="updateFieldValue" /> {{ $t('label.override.rootdisk.size') }} - +
{{ this.$t('message.deployasis') }}
0) { deployVmData.rootdisksize = values.rootdisksize + } else if (this.rootDiskSizeFixed > 0) { + deployVmData.rootdisksize = this.rootDiskSizeFixed } if (values.hypervisor && values.hypervisor.length > 0) { deployVmData.hypervisor = values.hypervisor @@ -1958,6 +1965,10 @@ export default { this.updateFieldValue('memory', this.selectedTemplateConfiguration.memory) } } + if (offering && offering.rootdisksize > 0) { + this.rootDiskSizeFixed = offering.rootdisksize / (1024 * 1024 * 1024.0).toFixed(2) + this.showRootDiskSizeChanger = false + } } } } diff --git a/utils/src/main/java/com/cloud/utils/exception/CSExceptionErrorCode.java b/utils/src/main/java/com/cloud/utils/exception/CSExceptionErrorCode.java index 34fe46ddbdf..64978d2bc24 100644 --- a/utils/src/main/java/com/cloud/utils/exception/CSExceptionErrorCode.java +++ b/utils/src/main/java/com/cloud/utils/exception/CSExceptionErrorCode.java @@ -70,6 +70,7 @@ public class CSExceptionErrorCode { ExceptionErrorCodeMap.put("com.cloud.async.AsyncCommandQueued", 4540); ExceptionErrorCodeMap.put("com.cloud.exception.RequestLimitException", 4545); ExceptionErrorCodeMap.put("com.cloud.exception.StorageConflictException", 4550); + ExceptionErrorCodeMap.put("com.cloud.exception.UnavailableCommandException", 4555); // Have a special error code for ServerApiException when it is // thrown in a standalone manner when failing to detect any of the above