From 8b281284a26d4d21cae031e7f8dcb789383785f3 Mon Sep 17 00:00:00 2001 From: Harikrishna Date: Wed, 11 Oct 2023 16:58:29 +0530 Subject: [PATCH 1/3] ui: Fix non admin logouts (#8065) If a user (non-admin) logs out from a session, then login page is not loading completely. Few starter APIs like listIds are failing and showing unauthorised access notification in Login Page. Also if SAML is enabled, it is not getting enabled since the corresponding API are failed. User needs to refresh the browser to get it back. --- ui/src/views/dashboard/UsageDashboard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/dashboard/UsageDashboard.vue b/ui/src/views/dashboard/UsageDashboard.vue index 4264a90f925..a6983300cb9 100644 --- a/ui/src/views/dashboard/UsageDashboard.vue +++ b/ui/src/views/dashboard/UsageDashboard.vue @@ -142,7 +142,7 @@ export default { (newValue, oldValue) => { if (newValue && newValue.id && (!oldValue || newValue.id !== oldValue.id)) { this.fetchData() - } else if (store.getters.userInfo.roletype !== 'Admin') { + } else if (store.getters.userInfo.roletype !== 'Admin' && !store.getters.logoutFlag) { this.fetchData() } } From 7b4cf1b1c685a4c721e95c9093d896879f31b1e5 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 11 Oct 2023 18:26:50 +0530 Subject: [PATCH 2/3] ui: update vm deploy form iso label (#8075) --- ui/public/locales/en.json | 1 + ui/src/views/compute/wizard/TemplateIsoSelection.vue | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index 528ea521c53..824638efa4d 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -1275,6 +1275,7 @@ "label.move.to.bottom": "Move to bottom", "label.move.to.top": "Move to top", "label.move.up.row": "Move up one row", +"label.my.isos": "My ISOs", "label.my.templates": "My templates", "label.na": "N/A", "label.name": "Name", diff --git a/ui/src/views/compute/wizard/TemplateIsoSelection.vue b/ui/src/views/compute/wizard/TemplateIsoSelection.vue index 63c5a429e81..9393a7860de 100644 --- a/ui/src/views/compute/wizard/TemplateIsoSelection.vue +++ b/ui/src/views/compute/wizard/TemplateIsoSelection.vue @@ -56,6 +56,10 @@ export default { name: 'TemplateIsoSelection', components: { TemplateIsoRadioGroup }, props: { + selected: { + type: String, + default: null + }, items: { type: Object, default: () => {} @@ -85,7 +89,7 @@ export default { name: 'label.community' }, { id: 'selfexecutable', - name: 'label.my.templates' + name: this.selected === 'isoid' ? 'label.my.isos' : 'label.my.templates' }, { id: 'sharedexecutable', name: 'label.sharedexecutable' From 8350ce5aa40241d683749c1257813fa649e998be Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Wed, 11 Oct 2023 20:56:45 +0530 Subject: [PATCH 3/3] storage: allow VM snapshots without memory for KVM when global setting allows (#8062) This removes the conditional logic where comment notest to remove it after PR #5297 is merged that is applicable for ACS 4.18+. Only when the global setting is enabled and memory isn't selected, VM snapshot could be allowed for VMs on KVM that have qemu-guest-agent running. Signed-off-by: Rohit Yadav --- .../vmsnapshot/StorageVMSnapshotStrategy.java | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/StorageVMSnapshotStrategy.java b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/StorageVMSnapshotStrategy.java index 958290085fc..b6549740a4a 100644 --- a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/StorageVMSnapshotStrategy.java +++ b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/vmsnapshot/StorageVMSnapshotStrategy.java @@ -59,7 +59,6 @@ import com.cloud.storage.DataStoreRole; import com.cloud.storage.GuestOSVO; import com.cloud.storage.Snapshot; import com.cloud.storage.SnapshotVO; -import com.cloud.storage.Storage; import com.cloud.storage.VolumeApiService; import com.cloud.storage.VolumeVO; import com.cloud.storage.dao.SnapshotDao; @@ -360,10 +359,6 @@ public class StorageVMSnapshotStrategy extends DefaultVMSnapshotStrategy { @Override public StrategyPriority canHandle(Long vmId, Long rootPoolId, boolean snapshotMemory) { - //This check could be removed when PR #5297 is merged - if (vmHasNFSOrLocalVolumes(vmId)) { - return StrategyPriority.CANT_HANDLE; - } if (SnapshotManager.VmStorageSnapshotKvm.value() && !snapshotMemory) { UserVmVO vm = userVmDao.findById(vmId); if (vm.getState() == VirtualMachine.State.Running) { @@ -465,17 +460,4 @@ public class StorageVMSnapshotStrategy extends DefaultVMSnapshotStrategy { payload.setQuiescevm(false); return payload; } - - private boolean vmHasNFSOrLocalVolumes(long vmId) { - List volumeTOs = vmSnapshotHelper.getVolumeTOList(vmId); - - for (VolumeObjectTO volumeTO : volumeTOs) { - Long poolId = volumeTO.getPoolId(); - Storage.StoragePoolType poolType = vmSnapshotHelper.getStoragePoolType(poolId); - if (poolType == Storage.StoragePoolType.NetworkFilesystem || poolType == Storage.StoragePoolType.Filesystem) { - return true; - } - } - return false; - } }