harikrishna-patnala commented on code in PR #8107:
URL: https://github.com/apache/cloudstack/pull/8107#discussion_r1418519143
##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java:
##########
@@ -768,11 +768,11 @@ protected String getKubernetesClusterNodeNamePrefix() {
}
protected KubernetesClusterVO updateKubernetesClusterEntry(final Long
cores, final Long memory,
- final Long size, final Long serviceOfferingId, final Boolean
autoscaleEnabled, final Long minSize, final Long maxSize) {
+ final Long
size, final Long serviceOfferingId, final Boolean autoscaleEnabled, final Long
minSize, final Long maxSize, KubernetesCluster.State state) {
return Transaction.execute(new
TransactionCallback<KubernetesClusterVO>() {
@Override
public KubernetesClusterVO doInTransaction(TransactionStatus
status) {
- KubernetesClusterVO updatedCluster =
kubernetesClusterDao.createForUpdate(kubernetesCluster.getId());
+ KubernetesClusterVO updatedCluster =
kubernetesClusterDao.findById(kubernetesCluster.getId());
Review Comment:
This is a bigger change because, I observed createForUpdate() is returning
an object with all null or default values and assumption is that we have to
update that entry for all the columns.
This is causing few issues with scaling operations
1. When I tried to change the node count and change the compute offering at
the same time. Compute offering change on few nodes is missing. This happened
because of above code
2. Above issue is causing after effects where I could not change the compute
offering of the cluster anymore as there are differences in the compute
offerings of the nodes
3. The state issue, causing NPE (the actual bug raised here)
--
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]