weizhouapache commented on PR #11598:
URL: https://github.com/apache/cloudstack/pull/11598#issuecomment-3274639411

   tested ok @bernardodemarco 
   
   - create CKS cluster
   - stop it
   - scale it with different offering: works
   - scale it with the same offering: works, but noticed an exception in log
   
   ```
   2025-09-10 10:25:54,591 WARN  [c.c.k.c.a.KubernetesClusterScaleWorker] 
(API-Job-Executor-3:[ctx-4c667cd3, job-94, ctx-37993c65]) (logid:29bd2ac2) 
Failed to transition state of the Kubernetes cluster : cks-002 in state Stopped 
on event OperationSucceeded com.cloud.utils.fsm.NoTransitionException: Unable 
to transition to a new state from Stopped via OperationSucceeded
   ```
   
   @bernardodemarco 
   I suggest to add a simple change as below
   ```
   diff --git 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterScaleWorker.java
 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterScaleWorker.java
   index 6fb15088e9b..f6828e3b203 100644
   --- 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterScaleWorker.java
   +++ 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterScaleWorker.java
   @@ -476,6 +476,8 @@ public class KubernetesClusterScaleWorker extends 
KubernetesClusterResourceModif
                scaleKubernetesClusterOffering();
            } else if (clusterSizeScalingNeeded) {
                scaleKubernetesClusterSize();
   +        } else {
   +            return true;
            }
            stateTransitTo(kubernetesCluster.getId(), 
KubernetesCluster.Event.OperationSucceeded);
            return true;
   ```


-- 
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]

Reply via email to