shwstppr commented on code in PR #8107:
URL: https://github.com/apache/cloudstack/pull/8107#discussion_r1418642201
##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java:
##########
@@ -788,6 +788,9 @@ public KubernetesClusterVO
doInTransaction(TransactionStatus status) {
if (autoscaleEnabled != null) {
updatedCluster.setAutoscalingEnabled(autoscaleEnabled.booleanValue());
}
+ if (state != null) {
Review Comment:
@harikrishna-patnala curious, why do we need to update the state manually? I
feel that should be updated by FSM.
Also, I don't see a real use where code is explicitly updating the state
with this.
##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterScaleWorker.java:
##########
@@ -412,7 +411,7 @@ private void scaleKubernetesClusterSize() throws
CloudRuntimeException {
} else { // upscale, same node count handled above
scaleUpKubernetesClusterSize(newVmRequiredCount);
}
- kubernetesCluster = updateKubernetesClusterEntry(clusterSize, null);
+ kubernetesCluster = updateKubernetesClusterEntry(clusterSize,
serviceOffering);
Review Comment:
Will this have any effect in some cases?
What happens if scale is called for both size and offering, the new size is
lesser and for some reason offering scaling fails? Will it already update the
cluster's CPU and memory based on the new offering?
--
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]