bernardodemarco opened a new pull request, #11598:
URL: https://github.com/apache/cloudstack/pull/11598

   ### Description
   
   When scaling the compute offering of stopped k8s clusters, the following 
exception is thrown in the Management Server logs:
   
   ```bash
   2025-09-08 16:53:27,031 INFO  [c.c.k.c.a.KubernetesClusterActionWorker] 
(API-Job-Executor-3:ctx-32fdc15a job-43 ctx-3bbdb451) (logid:0a5136ec) Scaling 
Kubernetes cluster : k8s-min-offering
   2025-09-08 16:53:27,035 WARN  [c.c.k.c.a.KubernetesClusterActionWorker] 
(API-Job-Executor-3:ctx-32fdc15a job-43 ctx-3bbdb451) (logid:0a5136ec) Failed 
to transition state of the Kubernetes cluster : k8s-min-offering in state 
Stopped on event ScaleUpRequested
   com.cloud.utils.fsm.NoTransitionException: Unable to transition to a new 
state from Stopped via ScaleUpRequested
        at 
com.cloud.utils.fsm.StateMachine2.getTransition(StateMachine2.java:108)
        at com.cloud.utils.fsm.StateMachine2.getNextState(StateMachine2.java:94)
        at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:124)
        at 
com.cloud.kubernetes.cluster.actionworkers.KubernetesClusterActionWorker.stateTransitTo(KubernetesClusterActionWorker.java:560)
        at 
com.cloud.kubernetes.cluster.actionworkers.KubernetesClusterScaleWorker.scaleKubernetesClusterOffering(KubernetesClusterScaleWorker.java:288)
        at 
com.cloud.kubernetes.cluster.actionworkers.KubernetesClusterScaleWorker.scaleCluster(KubernetesClusterScaleWorker.java:470)
        at 
com.cloud.kubernetes.cluster.KubernetesClusterManagerImpl.scaleKubernetesCluster(KubernetesClusterManagerImpl.java:1744)
   # (...)
   ```
   
   It is relevant to highlight that, although the exception is thrown, it does 
not interfere in the scaling process.
   
   This PR proposes to fix the exception throw by adding a new state and 
transitions to the Kubernetes Cluster finite state machine.
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] build/CI
   - [ ] test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [X] Trivial
   
   ### Screenshots (if appropriate):
   
   ### How Has This Been Tested?
   
   Before upgrading the environment with the current PR's changes, I verified 
that when scaling the compute offering of stopped k8s clusters, the exception 
was thrown.
   
   After applying the PR's changes, I verified that when scaling the compute 
offering of stopped k8s clusters, no exceptions were thrown.
   


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