bernardodemarco commented on code in PR #11598:
URL: https://github.com/apache/cloudstack/pull/11598#discussion_r2333147216


##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesCluster.java:
##########
@@ -89,8 +90,11 @@ enum State {
             s_fsm.addTransition(State.Running, Event.AutoscaleRequested, 
State.Scaling);
             s_fsm.addTransition(State.Running, Event.ScaleUpRequested, 
State.Scaling);
             s_fsm.addTransition(State.Running, Event.ScaleDownRequested, 
State.Scaling);
+            s_fsm.addTransition(State.Stopped, Event.ScaleUpRequested, 
State.ScalingOfferingOfStoppedCluster);

Review Comment:
   > `ScalingStoppedCluster` is more simple I think
   
   @weizhouapache, thanks, I agree. I'll change that soon
   
   ---
   
   > can we not just use Scaling state as opposed to 
ScalingOfferingOfStoppedCluster? i.e.,
   
   @Pearl1594, unfortunately we cannot. As @weizhouapache mentioned 
(https://github.com/apache/cloudstack/pull/11598#discussion_r2333078802), the 
FSM has this transition:
   
   ```java
   s_fsm.addTransition(State.Scaling, Event.OperationSucceeded, State.Running);
   ```
   
   Thus, it would not be possible to transition from `Scaling` to `Stopped` 
when receiving an `Event.OperationSucceeded` event



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