Orange-OpenSource / casskop

This Kubernetes operator automates the Cassandra operations such as deploying a new rack aware cluster, adding/removing nodes, configuring the C* and JVM parameters, upgrading JVM and C* versions, and many more...
https://orange-opensource.github.io/casskop/
Apache License 2.0
183 stars 54 forks source link

Unset RollingRestart flag before comparing CassandraCluster objects in MultiCasskop #263

Closed cscetbon closed 4 years ago

cscetbon commented 4 years ago
Q A
Bug fix? [x]
New feature? []
API breaks? []
Deprecations? []
License Apache 2.0

MultiCasskop prevents a rolling restart by rollbacking the change when it sees the flag RollingRestart being set

fdehay commented 4 years ago

If I understand correctly, you are unsetting the flag RollingRestart in the spec of the CC. Will this not prevent the Rolling Restart to occur at CassKop level? May be you are working on a copy of the actual CC and then it would work. Just want to check :)

allamand commented 4 years ago

There are also other fields that are removed for the comparison, I think you just need to add this one also

cscetbon commented 4 years ago

If I understand correctly, you are unsetting the flag RollingRestart in the spec of the CC. Will this not prevent the Rolling Restart to occur at CassKop level? May be you are working on a copy of the actual CC and then it would work. Just want to check :)

Yeah it's just an object used in the comparison to decide if there is a change to apply or not to underlying cassandracluster objects

cscetbon commented 4 years ago

I still see some messages that shouldn't be there

time="2020-09-27T18:18:56Z" level=debug msg="CassandraCluster does not exist, we create it " 
  cluster=cassandra-demo kubernetes=k8s-cluster2 namespace=cluster2
time="2020-09-27T18:18:56Z" level=debug msg="Create CassandraCluster" cluster=cassandra-demo 
  kubernetes=k8s-cluster2 namespace=cluster2
time="2020-09-27T18:18:56Z" level=info msg="Just Update CassandraCluster, returning for now.." 
  cluster=cassandra-demo kubernetes=k8s-cluster2 namespace=cluster2

It's the last thing I have to figure out before this PR is ready for review