abh1sar commented on code in PR #12047:
URL: https://github.com/apache/cloudstack/pull/12047#discussion_r2681563069
##########
plugins/storage/volume/linstor/src/main/java/org/apache/cloudstack/storage/datastore/driver/LinstorPrimaryDataStoreDriverImpl.java:
##########
@@ -1063,13 +1065,27 @@ public void copyAsync(DataObject srcData, DataObject
dstData, AsyncCompletionCal
Answer answer = copyVolume(srcData, dstData);
res = new CopyCommandResult(null, answer);
} else {
- Answer answer = new Answer(null, false, "noimpl");
- res = new CopyCommandResult(null, answer);
- res.setResult("Not implemented yet");
+ throw new CloudRuntimeException("Not implemented for Linstor
primary storage.");
}
callback.complete(res);
}
+ private Host getEnabledClusterHost(StoragePool storagePool, List<String>
linstorNodeNames) {
+ List<HostVO> csHosts;
+ if (storagePool.getClusterId() != null) {
+ csHosts = _hostDao.findByClusterId(storagePool.getClusterId());
+ } else {
+ csHosts =
_hostDao.findByDataCenterId(storagePool.getDataCenterId());
Review Comment:
yes, it was added in 4.21.
Feel free to disregard my comments.
It would have made more sense if both methods findHypervisorHostInZone and
findHypervisorHostInCluster were around.
Just consider checking Status.Up also, if that makes sense.
--
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]