DaanHoogland commented on code in PR #6868:
URL: https://github.com/apache/cloudstack/pull/6868#discussion_r1013061381
##########
engine/schema/src/main/java/com/cloud/storage/dao/VolumeDaoImpl.java:
##########
@@ -759,4 +759,11 @@ public void updateDiskOffering(long volumeId, long
diskOfferingId) {
throw new CloudRuntimeException(e);
}
}
+ @Override
+ public VolumeVO getInstanceRootVolume(long instanceId, String
instanceUuid) {
Review Comment:
why add the uuid parameter?
##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -2335,6 +2337,15 @@ public UserVm recoverVirtualMachine(RecoverVMCmd cmd)
throws ResourceAllocationE
return _vmDao.findById(vmId);
}
+ protected void recoverRootVolume(VolumeVO volume, Long vmId) {
+ if (Volume.State.Destroy.equals(volume.getState())) {
+ _volumeService.recoverVolume(volume.getId());
+ _volsDao.attachVolume(volume.getId(), vmId, ROOT_DEVICE_ID);
+ } else {
+ _volumeService.publishVolumeCreationUsageEvent(volume);
+ }
Review Comment:
doesn´t this mean a volume creation event gets published when the volume is
in a state of Expunging/Expunged?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]