shwstppr commented on code in PR #7312:
URL: https://github.com/apache/cloudstack/pull/7312#discussion_r1126080453
##########
engine/storage/src/main/java/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java:
##########
@@ -318,6 +319,35 @@ protected EndPoint findEndpointForImageStorage(DataStore
store) {
return RemoteHostEndPoint.getHypervisorHostEndPoint(host);
}
+ protected Host getVmwareHostFromVolumeToDelete(VolumeInfo volume) {
+ VirtualMachine vm = volume.getAttachedVM();
+ if (vm == null) {
+ return null;
+ }
+ Long hostId = vm.getHostId() != null ? vm.getHostId() :
vm.getLastHostId();
+ if (hostId == null) {
+ return null;
+ }
+ HostVO host = hostDao.findById(hostId);
Review Comment:
It will try to find the host based on the storage pool of the volume at line
476,
https://github.com/apache/cloudstack/pull/7312/files#diff-45668a1459e79e7705bb54a8f6e09d972a12ffe972b06b61468e06f4f8ce2c3dR476
An option could be to completely remove the logic to try and find a host
based on volume VM
--
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]