Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
rohityadavcloud committed Oct 11, 2023
2 parents d2ad936 + 8350ce5 commit 8a34afa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
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;
Expand Down Expand Up @@ -360,10 +359,6 @@ public StrategyPriority canHandle(VMSnapshot vmSnapshot) {

@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) {
Expand Down Expand Up @@ -465,17 +460,4 @@ protected CreateSnapshotPayload setPayload(VolumeInfo vol, SnapshotVO snapshotCr
payload.setQuiescevm(false);
return payload;
}

private boolean vmHasNFSOrLocalVolumes(long vmId) {
List<VolumeObjectTO> 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;
}
}
1 change: 1 addition & 0 deletions ui/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,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",
Expand Down
6 changes: 5 additions & 1 deletion ui/src/views/compute/wizard/TemplateIsoSelection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ export default {
name: 'TemplateIsoSelection',
components: { TemplateIsoRadioGroup },
props: {
selected: {
type: String,
default: null
},
items: {
type: Object,
default: () => {}
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion ui/src/views/dashboard/UsageDashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,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()
}
}
Expand Down

0 comments on commit 8a34afa

Please sign in to comment.