sureshanaparti commented on code in PR #12800:
URL: https://github.com/apache/cloudstack/pull/12800#discussion_r2924095018
##########
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java:
##########
@@ -2376,6 +2381,15 @@ void performUnmanageVMInstancePrechecks(VMInstanceVO
vmVO) {
throw new UnsupportedServiceException("Cannot unmanage VM with id
= " + vmVO.getUuid() +
" as there is an ISO attached. Please detach ISO before
unmanaging.");
}
+
+ if (belongsToCksCluster(vmVO)) {
+ throw new UnsupportedServiceException("Cannot unmanage VM with id
= " + vmVO.getUuid() +
+ " as it belongs to a CKS cluster. Please remove the VM
from the CKS cluster before unmanaging.");
+ }
+ }
+
+ private boolean belongsToCksCluster(VMInstanceVO vmVO) {
Review Comment:
```suggestion
private boolean vmBelongsToCksCluster(VMInstanceVO vmVO) {
```
--
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]