diff --git a/framework/db/src/main/java/com/cloud/utils/crypt/EncryptionSecretKeyChanger.java b/framework/db/src/main/java/com/cloud/utils/crypt/EncryptionSecretKeyChanger.java index ae103ff34f6..a958d4ada72 100644 --- a/framework/db/src/main/java/com/cloud/utils/crypt/EncryptionSecretKeyChanger.java +++ b/framework/db/src/main/java/com/cloud/utils/crypt/EncryptionSecretKeyChanger.java @@ -147,7 +147,7 @@ public class EncryptionSecretKeyChanger { { bwriter.write(newMSKey); } catch (IOException e) { - System.out.println("Failed to write new secret to file. Please update the file manually"); + System.out.println(String.format("Please update the file %s manually. Failed to write new secret to file with error %s", keyFile, e.getMessage())); } } } diff --git a/setup/bindir/cloud-setup-databases.in b/setup/bindir/cloud-setup-databases.in index 37b696f9fce..0532613dd81 100755 --- a/setup/bindir/cloud-setup-databases.in +++ b/setup/bindir/cloud-setup-databases.in @@ -397,7 +397,11 @@ for example: def saveMgmtServerSecretKey(): if self.encryptiontype == 'file': - open(self.encryptionKeyFile, 'w').write(self.mgmtsecretkey) + try: + open(self.encryptionKeyFile, 'w').write(self.mgmtsecretkey) + except IOError as e: + msg = "Failed to save management server secret key file %s due to %s, also please check the default umask"%(self.encryptionKeyFile, e.strerror) + self.errorAndExit(msg) def formatEncryptResult(value): return 'ENC(%s)'%value diff --git a/ui/src/components/view/ResourceIcon.vue b/ui/src/components/view/ResourceIcon.vue index 28c9820bead..176c0c7ca8f 100644 --- a/ui/src/components/view/ResourceIcon.vue +++ b/ui/src/components/view/ResourceIcon.vue @@ -43,6 +43,10 @@ export default { } }, getDimensions () { + const num = Number(this.size) + if (Number.isInteger(num) && num > 0) { + return num + } switch (this.size) { case '4x': return 56 diff --git a/ui/src/locales/index.js b/ui/src/locales/index.js index d8ff08ff4a9..29c828b6447 100644 --- a/ui/src/locales/index.js +++ b/ui/src/locales/index.js @@ -26,7 +26,8 @@ export const i18n = createI18n({ fallbackLocale: 'en', silentTranslationWarn: true, messages: messages, - silentFallbackWarn: true + silentFallbackWarn: true, + warnHtmlInMessage: 'off' }) export function loadLanguageAsync (lang) { diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index 312860f993c..49554c699ba 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -45,12 +45,11 @@
- + :image="zoneItem.icon.base64image" + size="36" + style="marginTop: -30px; marginLeft: 60px" />
@@ -1487,9 +1486,6 @@ export default { 'maxmemory' in serviceOffering.serviceofferingdetails && 'maxcpunumber' in serviceOffering.serviceofferingdetails && 'minmemory' in serviceOffering.serviceofferingdetails }, - getImg (image) { - return 'data:image/png;charset=utf-8;base64, ' + image - }, updateOverrideRootDiskShowParam (val) { if (val) { this.showRootDiskSizeChanger = false diff --git a/ui/src/views/infra/ClusterAdd.vue b/ui/src/views/infra/ClusterAdd.vue index cbf48766997..5450db9aedd 100644 --- a/ui/src/views/infra/ClusterAdd.vue +++ b/ui/src/views/infra/ClusterAdd.vue @@ -269,10 +269,12 @@ export default { this.addCluster() }, addCluster () { + let clustername = this.clustername + if (this.hypervisor === 'VMware') { const clusternameVal = this.clustername this.url = `http://${this.host}/${this.dataCenter}/${clusternameVal}` - this.clustername = `${this.host}/${this.dataCenter}/${clusternameVal}` + clustername = `${this.host}/${this.dataCenter}/${clusternameVal}` } this.loading = true this.parentToggleLoading() @@ -281,7 +283,7 @@ export default { hypervisor: this.hypervisor, clustertype: this.clustertype, podId: this.podId, - clustername: this.clustername, + clustername: clustername, url: this.url } if (this.ovm3pool) { diff --git a/ui/src/views/infra/zone/ZoneWizardAddResources.vue b/ui/src/views/infra/zone/ZoneWizardAddResources.vue index ab85670c53f..073be20d06d 100644 --- a/ui/src/views/infra/zone/ZoneWizardAddResources.vue +++ b/ui/src/views/infra/zone/ZoneWizardAddResources.vue @@ -137,14 +137,14 @@ export default { return this.prefillContent?.hypervisor || null }, localstorageenabled () { - return this.prefillContent?.localstorageenabled?.value || false + return this.prefillContent?.localstorageenabled || false }, localstorageenabledforsystemvm () { - return this.prefillContent?.localstorageenabledforsystemvm?.value || false + return this.prefillContent?.localstorageenabledforsystemvm || false }, steps () { const steps = [] - const hypervisor = this.prefillContent.hypervisor ? this.prefillContent.hypervisor.value : null + const hypervisor = this.prefillContent.hypervisor ? this.prefillContent.hypervisor : null steps.push({ title: 'label.cluster', fromKey: 'clusterResource', diff --git a/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue b/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue index 8d4b28144e5..5be870c7964 100644 --- a/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue +++ b/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue @@ -143,7 +143,7 @@ -
+
{{ $t('message.required.traffic.type') }}
{{ $t('label.cancel') }} @@ -161,7 +161,7 @@ 1 let isValid = true this.requiredTrafficTypes.forEach(type => { + if (!isValid) return false let foundType = false this.physicalNetworks.forEach(net => { net.traffics.forEach(traffic => { + if (!isValid) return false if (traffic.type === type) { foundType = true } - if (shouldHaveLabels && (!traffic.label || traffic.label.length === 0)) { - isValid = false + if (this.hypervisor !== 'VMware') { + if (shouldHaveLabels && (!traffic.label || traffic.label.length === 0)) { + isValid = false + } + } else { + if (shouldHaveLabels && (!traffic.vSwitchName || traffic.vSwitchName.length === 0)) { + isValid = false + } } }) }) @@ -477,12 +485,12 @@ export default { const fields = {} if (this.hypervisor === 'VMware') { delete this.trafficInEdit.traffic.label - fields.vSwitchName = null - fields.vlanId = null + fields.vSwitchName = this.trafficInEdit?.traffic?.vSwitchName || null + fields.vlanId = this.trafficInEdit?.traffic?.vlanId || null if (traffic.type === 'guest') { fields.vSwitchName = this.trafficInEdit?.traffic?.vSwitchName || 'vSwitch0' } - fields.vSwitchType = 'vmwaresvs' + fields.vSwitchType = this.trafficInEdit?.traffic?.vSwitchType || 'vmwaresvs' } else { delete this.trafficInEdit.traffic.vSwitchName delete this.trafficInEdit.traffic.vlanId