From eccb2e36e86c7b82fb1f06cf0d75cb17703839e2 Mon Sep 17 00:00:00 2001 From: abh1sar Date: Tue, 1 Oct 2024 13:48:55 +0530 Subject: [PATCH 01/52] Show Usage Server configuration in a separate pane --- .../src/main/resources/META-INF/db/schema-41910to42000.sql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql b/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql index c36b71c2f250..554c2cd060a7 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql @@ -425,3 +425,8 @@ INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid, hypervisor_type, hypervi CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.vm_instance', 'delete_protection', 'boolean DEFAULT FALSE COMMENT "delete protection for vm" '); CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.volumes', 'delete_protection', 'boolean DEFAULT FALSE COMMENT "delete protection for volumes" '); + +-- Create a new group for Usage Server related configurations +INSERT INTO `cloud`.`configuration_group` (`name`, `description`, `precedence`) VALUES ('Usage Server', 'Usage Server related configuration', 9); +DELETE FROM `cloud`.`configuration_subgroup` WHERE `name`='Usage'; +INSERT INTO `cloud`.`configuration_subgroup` (`name`, `keywords`, `precedence`, `group_id`) VALUES ('Usage', NULL, 1, (SELECT id FROM `cloud`.`configuration_group` WHERE `name` = 'Usage Server')); From fb467854bc3bc729a546e989c0df42a5b380d4cf Mon Sep 17 00:00:00 2001 From: abh1sar Date: Wed, 2 Oct 2024 09:33:33 +0530 Subject: [PATCH 02/52] UI: Option to attach volume to an instance during create volume --- ui/public/locales/en.json | 1 + ui/src/views/storage/CreateVolume.vue | 100 +++++++++++++++++++++++++- 2 files changed, 98 insertions(+), 3 deletions(-) diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index eb1be420b2ed..b6f396074e56 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -53,6 +53,7 @@ "label.action": "Action", "label.action.attach.disk": "Attach disk", "label.action.attach.iso": "Attach ISO", +"label.action.attach.to.instance": "Attach to Instance", "label.action.bulk.delete.egress.firewall.rules": "Bulk delete egress firewall rules", "label.action.bulk.delete.firewall.rules": "Bulk delete firewall rules", "label.action.bulk.delete.ip.v6.firewall.rules": "Bulk remove IPv6 firewall rules", diff --git a/ui/src/views/storage/CreateVolume.vue b/ui/src/views/storage/CreateVolume.vue index 32a5e667d511..586667dd0f05 100644 --- a/ui/src/views/storage/CreateVolume.vue +++ b/ui/src/views/storage/CreateVolume.vue @@ -116,6 +116,48 @@ :placeholder="apiParams.maxiops.description"/> + + + + + + + + + {{ vm.name || vm.displayname }} + + + + +
+ + + + + + + +
+ +
+
{{ $t('label.cancel') }} {{ $t('label.ok') }} @@ -159,7 +201,10 @@ export default { offerings: [], customDiskOffering: false, loading: false, - isCustomizedDiskIOps: false + isCustomizedDiskIOps: false, + virtualmachines: [], + attachVolume: false, + vmidtoattach: null } }, computed: { @@ -204,6 +249,10 @@ export default { } }] }) + if (this.attachVolume) { + this.rules.virtualmachineid = [{ required: true, message: this.$t('message.error.select') }] + this.rules.deviceid = [{ required: true, message: this.$t('message.error.select') }] + } if (!this.createVolumeFromSnapshot) { this.rules.name = [{ required: true, message: this.$t('message.error.volume.name') }] this.rules.diskofferingid = [{ required: true, message: this.$t('message.error.select') }] @@ -248,6 +297,9 @@ export default { this.zones = json.listzonesresponse.zone || [] this.form.zoneid = this.zones[0].id || '' this.fetchDiskOfferings(this.form.zoneid) + if (this.attachVolume) { + this.fetchVirtualMachines(this.form.zoneid) + } }).finally(() => { this.loading = false }) @@ -301,6 +353,31 @@ export default { this.loading = false }) }, + fetchVirtualMachines (zoneId) { + var params = { + zoneid: zoneId, + details: 'min' + } + if (this.owner.projectid) { + params.projectid = this.owner.projectid + } else { + params.account = this.owner.account + params.domainid = this.owner.domainid + } + + this.loading = true + var vmStates = ['Running', 'Stopped'] + vmStates.forEach((state) => { + params.state = state + api('listVirtualMachines', params).then(response => { + this.virtualmachines = this.virtualmachines.concat(response.listvirtualmachinesresponse.virtualmachine || []) + }).catch(error => { + this.$notifyError(error) + }).finally(() => { + this.loading = false + }) + }) + }, handleSubmit (e) { if (this.loading) return this.formRef.value.validate().then(() => { @@ -315,6 +392,10 @@ export default { if (this.createVolumeFromSnapshot) { values.snapshotid = this.resource.id } + if (this.attachVolume) { + this.vmidtoattacch = values.virtualmachineid + values.virtualmachineid = null + } values.domainid = this.owner.domainid if (this.owner.projectid) { values.projectid = this.owner.projectid @@ -330,10 +411,15 @@ export default { successMessage: this.$t('message.success.create.volume'), successMethod: (result) => { this.closeModal() - if (this.createVolumeFromVM) { + if (this.createVolumeFromVM || this.attachVolume) { const params = {} params.id = result.jobresult.volume.id - params.virtualmachineid = this.resource.id + if (this.createVolumeFromVM) { + params.virtualmachineid = this.resource.id + } else { + params.virtualmachineid = this.vmidtoattach + params.deviceid = values.deviceid + } api('attachVolume', params).then(response => { this.$pollJob({ jobId: response.attachvolumeresponse.jobid, @@ -368,6 +454,14 @@ export default { const offering = this.offerings.filter(x => x.id === id) this.customDiskOffering = offering[0]?.iscustomized || false this.isCustomizedDiskIOps = offering[0]?.iscustomizediops || false + }, + onChangeAttachToVM (zone) { + this.attachVolume = !this.attachVolume + this.virtualmachines = [] + if (this.attachVolume) { + this.attachVolumeApiParams = this.$getApiParams('attachVolume') + this.fetchVirtualMachines(this.form.zoneid) + } } } } From 0a097c4837fc649886c101e9deec921fe7522150 Mon Sep 17 00:00:00 2001 From: abh1sar Date: Fri, 4 Oct 2024 02:48:50 +0530 Subject: [PATCH 03/52] Show service ip in management server details tab --- ui/src/config/section/infra/managementServers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/config/section/infra/managementServers.js b/ui/src/config/section/infra/managementServers.js index cda19ef7cd5f..3f367e20d067 100644 --- a/ui/src/config/section/infra/managementServers.js +++ b/ui/src/config/section/infra/managementServers.js @@ -33,7 +33,7 @@ export default { } return fields }, - details: ['collectiontime', 'usageislocal', 'dbislocal', 'lastserverstart', 'lastserverstop', 'lastboottime', 'version', 'loginfo', 'systemtotalcpucycles', 'systemloadaverages', 'systemcycleusage', 'systemmemorytotal', 'systemmemoryfree', 'systemmemoryvirtualsize', 'availableprocessors', 'javadistribution', 'javaversion', 'osdistribution', 'kernelversion', 'agentcount', 'sessions', 'heapmemoryused', 'heapmemorytotal', 'threadsblockedcount', 'threadsdeamoncount', 'threadsnewcount', 'threadsrunnablecount', 'threadsterminatedcount', 'threadstotalcount', 'threadswaitingcount'], + details: ['serviceip', 'collectiontime', 'usageislocal', 'dbislocal', 'lastserverstart', 'lastserverstop', 'lastboottime', 'version', 'loginfo', 'systemtotalcpucycles', 'systemloadaverages', 'systemcycleusage', 'systemmemorytotal', 'systemmemoryfree', 'systemmemoryvirtualsize', 'availableprocessors', 'javadistribution', 'javaversion', 'osdistribution', 'kernelversion', 'agentcount', 'sessions', 'heapmemoryused', 'heapmemorytotal', 'threadsblockedcount', 'threadsdeamoncount', 'threadsnewcount', 'threadsrunnablecount', 'threadsterminatedcount', 'threadstotalcount', 'threadswaitingcount'], tabs: [ { name: 'details', From 0d024c34f5ff959d180f14c376a43dd06bccc813 Mon Sep 17 00:00:00 2001 From: abh1sar Date: Fri, 4 Oct 2024 03:56:43 +0530 Subject: [PATCH 04/52] change Schedule Snapshots to Recurring Snapshots --- ui/public/locales/de_DE.json | 1 - ui/public/locales/el_GR.json | 1 - ui/public/locales/en.json | 1 - ui/public/locales/ja_JP.json | 1 - ui/public/locales/ko_KR.json | 1 - ui/public/locales/pt_BR.json | 1 - ui/public/locales/zh_CN.json | 1 - ui/src/views/storage/RecurringSnapshotVolume.vue | 2 +- 8 files changed, 1 insertion(+), 8 deletions(-) diff --git a/ui/public/locales/de_DE.json b/ui/public/locales/de_DE.json index d9adc43469e0..abf471ae17de 100644 --- a/ui/public/locales/de_DE.json +++ b/ui/public/locales/de_DE.json @@ -1265,7 +1265,6 @@ "label.save.new.rule": "Neue Regel Speichern", "label.schedule": "Zeitplan", "label.scheduled.backups": "geplante Backups", -"label.scheduled.snapshots": "geplante Schnappschüsse", "label.scope": "Geltungsbereich", "label.search": "Suche", "label.secondary.isolated.vlan.type.isolated": "Isoliert", diff --git a/ui/public/locales/el_GR.json b/ui/public/locales/el_GR.json index 754cde89542c..7b7f4b29e128 100644 --- a/ui/public/locales/el_GR.json +++ b/ui/public/locales/el_GR.json @@ -1517,7 +1517,6 @@ "label.scale.vm": "Κλίμακα εικονικής μηχανής", "label.schedule": "Πρόγραμμα", "label.scheduled.backups": "Προγραμματισμένα αντίγραφα ασφαλείας", -"label.scheduled.snapshots": "Προγραμματισμένα στιγμιότυπα", "label.scope": "Πεδίο εφαρμογής", "label.search": "Αναζήτηση", "label.secondary.isolated.vlan.type.isolated": "Απομονωμένες", diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index b6f396074e56..1bde924e198f 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -1986,7 +1986,6 @@ "label.schedule": "Schedule", "label.schedule.add": "Add schedule", "label.scheduled.backups": "Scheduled backups", -"label.scheduled.snapshots": "Scheduled Snapshots", "label.schedules": "Schedules", "label.scope": "Scope", "label.scope.tooltip": "Primary Storage Pool Scope", diff --git a/ui/public/locales/ja_JP.json b/ui/public/locales/ja_JP.json index f1518286f80b..53009781500f 100644 --- a/ui/public/locales/ja_JP.json +++ b/ui/public/locales/ja_JP.json @@ -1969,7 +1969,6 @@ "label.scaleup.policy": "スケールアップポリシー", "label.schedule": "スケジュール", "label.scheduled.backups": "スケジュールされたバックアップ", - "label.scheduled.snapshots": "スケジュールされたスナップショット", "label.scope": "スコープ", "label.search": "検索", "label.secondary.isolated.vlan.type.isolated": "隔離", diff --git a/ui/public/locales/ko_KR.json b/ui/public/locales/ko_KR.json index a34cdea767f1..153bfd64ceff 100644 --- a/ui/public/locales/ko_KR.json +++ b/ui/public/locales/ko_KR.json @@ -1322,7 +1322,6 @@ "label.scale.vm": "VM \ud655\uc7a5", "label.schedule": "\uc2a4\ucf00\uc904", "label.scheduled.backups": "\uc608\uc57d\ub41c \ubc31\uc5c5", -"label.scheduled.snapshots": "\uc608\uc57d\ub41c \uc2a4\ub0c5\uc0f7", "label.scope": "\ubc94\uc704", "label.search": "\uac80\uc0c9", "label.secondary.isolated.vlan.type.isolated": "isolated", diff --git a/ui/public/locales/pt_BR.json b/ui/public/locales/pt_BR.json index f02aee747eb8..4adcfbedfc82 100644 --- a/ui/public/locales/pt_BR.json +++ b/ui/public/locales/pt_BR.json @@ -1426,7 +1426,6 @@ "label.scale.vm": "Escalar VM", "label.schedule": "Programar", "label.scheduled.backups": "Backups programados", -"label.scheduled.snapshots": "Snapshots programados", "label.scope": "Escopo", "label.search": "Pesquisar", "label.secondary.isolated.vlan.type.isolated": "Isolada", diff --git a/ui/public/locales/zh_CN.json b/ui/public/locales/zh_CN.json index 91353d2f81ab..5337829b53dd 100644 --- a/ui/public/locales/zh_CN.json +++ b/ui/public/locales/zh_CN.json @@ -2248,7 +2248,6 @@ "label.schedule": "\u65E5\u7A0B", "label.scheduled.backups": "\u5B9A\u65F6\u5907\u4EFD", - "label.scheduled.snapshots": "\u8BA1\u5212\u5FEB\u7167", "label.scope": "\u8303\u56F4", "label.search": "\u641C\u7D22", diff --git a/ui/src/views/storage/RecurringSnapshotVolume.vue b/ui/src/views/storage/RecurringSnapshotVolume.vue index ce929848de43..dc2e83a91c4c 100644 --- a/ui/src/views/storage/RecurringSnapshotVolume.vue +++ b/ui/src/views/storage/RecurringSnapshotVolume.vue @@ -27,7 +27,7 @@ @close-action="closeAction" @refresh="handleRefresh"/> - + Date: Fri, 4 Oct 2024 04:02:57 +0530 Subject: [PATCH 05/52] Change the hypervisor order so that kvm, vmware, xenserver show up first --- server/src/main/java/com/cloud/configuration/Config.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/com/cloud/configuration/Config.java b/server/src/main/java/com/cloud/configuration/Config.java index ce3ac7684681..32e53accbb8b 100644 --- a/server/src/main/java/com/cloud/configuration/Config.java +++ b/server/src/main/java/com/cloud/configuration/Config.java @@ -665,8 +665,8 @@ public enum Config { ManagementServer.class, String.class, "hypervisor.list", - HypervisorType.Hyperv + "," + HypervisorType.KVM + "," + HypervisorType.XenServer + "," + HypervisorType.VMware + "," + HypervisorType.BareMetal + "," + - HypervisorType.Ovm + "," + HypervisorType.LXC + "," + HypervisorType.Ovm3, + HypervisorType.KVM + ", " + HypervisorType.VMware + ", " + HypervisorType.XenServer + ", " + HypervisorType.Hyperv + "," + + HypervisorType.BareMetal + "," + HypervisorType.Ovm + "," + HypervisorType.LXC + "," + HypervisorType.Ovm3, "The list of hypervisors that this deployment will use.", "hypervisorList", ConfigKey.Kind.CSV, From a79b603d21707f8db559eea0585ffe42c3605ba3 Mon Sep 17 00:00:00 2001 From: abh1sar Date: Fri, 4 Oct 2024 14:34:21 +0530 Subject: [PATCH 06/52] Remove extra space in hypervisor names in config.java --- server/src/main/java/com/cloud/configuration/Config.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/com/cloud/configuration/Config.java b/server/src/main/java/com/cloud/configuration/Config.java index 32e53accbb8b..9a3b3368518b 100644 --- a/server/src/main/java/com/cloud/configuration/Config.java +++ b/server/src/main/java/com/cloud/configuration/Config.java @@ -665,7 +665,7 @@ public enum Config { ManagementServer.class, String.class, "hypervisor.list", - HypervisorType.KVM + ", " + HypervisorType.VMware + ", " + HypervisorType.XenServer + ", " + HypervisorType.Hyperv + "," + + HypervisorType.KVM + "," + HypervisorType.VMware + "," + HypervisorType.XenServer + "," + HypervisorType.Hyperv + "," + HypervisorType.BareMetal + "," + HypervisorType.Ovm + "," + HypervisorType.LXC + "," + HypervisorType.Ovm3, "The list of hypervisors that this deployment will use.", "hypervisorList", From d6181d542108d02cca31daa758234bb29e1b317a Mon Sep 17 00:00:00 2001 From: Lucas Martins <56271185+lucas-a-martins@users.noreply.github.com> Date: Fri, 4 Oct 2024 16:41:30 -0300 Subject: [PATCH 07/52] Fix `updateTemplatePermission` when the UI is set to a language other than English (#9766) * Fix updateTemplatePermission UI in non-english language * Improve fix --------- Co-authored-by: Lucas Martins --- ui/public/locales/pt_BR.json | 4 ++-- .../image/UpdateTemplateIsoPermissions.vue | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ui/public/locales/pt_BR.json b/ui/public/locales/pt_BR.json index f02aee747eb8..6955d83a510e 100644 --- a/ui/public/locales/pt_BR.json +++ b/ui/public/locales/pt_BR.json @@ -1482,8 +1482,8 @@ "label.setting": "Configura\u00e7\u00e3o", "label.settings": "Configura\u00e7\u00f5es", "label.setup": "Configura\u00e7\u00e3o", -"label.shared": "Compatilhado", -"label.sharedexecutable": "Compatilhado", +"label.shared": "Compartilhado", +"label.sharedexecutable": "Compartilhado", "label.sharedmountpoint": "SharedMountPoint", "label.sharedrouterip": "Endere\u00e7os IPv4 para o roteador dentro da rede compartilhada", "label.sharedrouteripv6": "Endere\u00e7os IPv6 para o roteador dentro da rede compartilhada", diff --git a/ui/src/views/image/UpdateTemplateIsoPermissions.vue b/ui/src/views/image/UpdateTemplateIsoPermissions.vue index c7b0f9e5cf19..557574156b17 100644 --- a/ui/src/views/image/UpdateTemplateIsoPermissions.vue +++ b/ui/src/views/image/UpdateTemplateIsoPermissions.vue @@ -25,7 +25,7 @@

{{ $t('label.operation') }}

- {{ $t('label.add') }} - {{ $t('label.remove') }} - {{ $t('label.reset') }} + {{ $t('label.add') }} + {{ $t('label.remove') }} + {{ $t('label.reset') }}
-