From 3a51540c24932d573564c56124231e3d527e2909 Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Fri, 18 Jun 2021 19:27:22 +0530 Subject: [PATCH 01/11] ui: Notify vm password on reinstall of VM (for password enabled templates) (#5129) * ui: Notify vm password on reinstall of VM (for password enabled templates) * refactor --- ui/src/config/section/compute.js | 12 ++++++++++++ ui/src/views/AutogenView.vue | 3 +++ 2 files changed, 15 insertions(+) diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js index 312c0903e39..48e9a10742b 100644 --- a/ui/src/config/section/compute.js +++ b/ui/src/config/section/compute.js @@ -144,6 +144,18 @@ export default { virtualmachineid: { value: (record) => { return record.id } } + }, + successMethod: (obj, result) => { + console.log('here') + const vm = result.jobresult.virtualmachine || {} + if (result.jobstatus === 1 && vm.password) { + const name = vm.displayname || vm.name || vm.id + obj.$notification.success({ + message: `${obj.$t('label.reinstall.vm')}: ` + name, + description: `${obj.$t('label.password.reset.confirm')}: ` + vm.password, + duration: 0 + }) + } } }, { diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index c51487c3b7a..ebeca6e4ab0 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -871,6 +871,9 @@ export default { }) } } + if ('successMethod' in action) { + action.successMethod(this, result) + } }, errorMethod: () => this.fetchData(), loadingMessage: `${this.$t(action.label)} - ${resourceName}`, From 53c2e19d5f010feed2d161f1275568b1d66f7746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Beims=20Br=C3=A4scher?= Date: Thu, 24 Jun 2021 02:33:46 -0300 Subject: [PATCH 02/11] ui: Fix UI issue when deploying VM with rootdisksize (GB now, not in bytes) (#5150) --- ui/src/views/compute/DeployVM.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index c0965bfd593..16abfa80aa3 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -1966,7 +1966,7 @@ export default { } } if (offering && offering.rootdisksize > 0) { - this.rootDiskSizeFixed = offering.rootdisksize / (1024 * 1024 * 1024.0).toFixed(2) + this.rootDiskSizeFixed = offering.rootdisksize this.showRootDiskSizeChanger = false } } From 347f8a5a73ab469c5a630e6dc736a0392dc1c37a Mon Sep 17 00:00:00 2001 From: Wei Zhou <57355700+weizhouapache@users.noreply.github.com> Date: Thu, 24 Jun 2021 07:35:24 +0200 Subject: [PATCH 03/11] VR: fix source cidr of egress rules are not applied (#5143) This reverts change in commit https://github.com/apache/cloudstack/commit/065fa1c849dd09dd734778913bc50c844aa0aee3#diff-c78f7f699938cf529cbcef26bda2ed93630b58f336986fd0753fbfa1a6adbc43L103-R103 --- systemvm/debian/opt/cloud/bin/configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemvm/debian/opt/cloud/bin/configure.py b/systemvm/debian/opt/cloud/bin/configure.py index 8fdf134b506..cafd739d7ca 100755 --- a/systemvm/debian/opt/cloud/bin/configure.py +++ b/systemvm/debian/opt/cloud/bin/configure.py @@ -111,7 +111,7 @@ class CsAcl(CsDataBag): self.rule['allowed'] = True self.rule['action'] = "ACCEPT" - if self.rule['type'] == 'all' and obj['source_cidr_list']: + if self.rule['type'] == 'all' and not obj['source_cidr_list']: self.rule['cidr'] = [] else: self.rule['cidr'] = obj['source_cidr_list'] From 0eeb094949e70c242daebe2917f24f811cf007c7 Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Thu, 24 Jun 2021 12:36:05 +0700 Subject: [PATCH 04/11] ui: watch the systemVM for enabling quickview when newly resource (#5137) --- ui/src/components/view/QuickView.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/components/view/QuickView.vue b/ui/src/components/view/QuickView.vue index 05ffe3d408a..d17ca9f5107 100644 --- a/ui/src/components/view/QuickView.vue +++ b/ui/src/components/view/QuickView.vue @@ -58,7 +58,7 @@ export default { } }, watch: { - actions (item) { + resource () { this.actionsExist = this.doActionsExist() } }, From faa57434abfe81103387078494fc56d6ef6c479c Mon Sep 17 00:00:00 2001 From: Rakesh Date: Thu, 24 Jun 2021 07:37:06 +0200 Subject: [PATCH 05/11] systemvm: Change logrotate interval to hourly (#5132) * Change logrotate interval to hourly The logrotate config says interval as hourly but it relies on timer service to be invoked but in timer the frequency is mentioned as 12h. So it wont be invoked every hour. So change the frequency to hourly * Add change to vpc router --- systemvm/debian/opt/cloud/bin/setup/router.sh | 7 +++++++ systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/systemvm/debian/opt/cloud/bin/setup/router.sh b/systemvm/debian/opt/cloud/bin/setup/router.sh index 7c9549354e1..e8f6edf0ceb 100755 --- a/systemvm/debian/opt/cloud/bin/setup/router.sh +++ b/systemvm/debian/opt/cloud/bin/setup/router.sh @@ -100,6 +100,13 @@ setup_router() { mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 fi + # Setup hourly lograte in systemd timer + sed -i 's/OnCalendar=daily/OnCalendar=hourly/g' /usr/lib/systemd/system/logrotate.timer + sed -i 's/AccuracySec=12h/AccuracySec=5m/g' /usr/lib/systemd/system/logrotate.timer + + # reload daemon + /usr/bin/systemctl daemon-reload + # Load modules to support NAT traversal in VR modprobe nf_nat_pptp } diff --git a/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh b/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh index 68877821fb3..f97fb161f47 100755 --- a/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh +++ b/systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh @@ -113,6 +113,13 @@ EOF mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 fi + # Setup hourly lograte in systemd timer + sed -i 's/OnCalendar=daily/OnCalendar=hourly/g' /usr/lib/systemd/system/logrotate.timer + sed -i 's/AccuracySec=12h/AccuracySec=5m/g' /usr/lib/systemd/system/logrotate.timer + + # reload daemon + /usr/bin/systemctl daemon-reload + # Load modules to support NAT traversal in VR modprobe nf_nat_pptp } From b9712c65ca319022ea8decec9b0bc945a720ba24 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 24 Jun 2021 11:07:58 +0530 Subject: [PATCH 06/11] ui: fix missing component in SearchView (#5123) TooltipButton was not added as Vue component. It was leading to error in page load. Signed-off-by: Abhishek Kumar --- ui/src/components/view/SearchView.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/components/view/SearchView.vue b/ui/src/components/view/SearchView.vue index 100acf0d47b..cbc93446bd7 100644 --- a/ui/src/components/view/SearchView.vue +++ b/ui/src/components/view/SearchView.vue @@ -76,7 +76,7 @@ - + @@ -112,9 +112,13 @@