-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add script to update the statefulset service name #104
Conversation
I just tried running the script after getting my cluster into the upgraded state and I ended up an error:
cass-operator is gone, but the C* pod did stay up and running, so that's good 😄
Maybe its a version thing? If I look at the help for delete on my system I get:
Clearly here, --cascade doesn't support much. Here's what I'm running on, it's kind locally:
|
So I've confirmed after talking to @burmanm and some quick testing that the problem I saw has to do with the version of kubectl. Looks like the "orphan" cascade was introduced first in v1.20, so as it is, things will fail on anything prior to that - my first attempt was on v1.19. After I upgraded to v1.21 (latest), the script worked. However, after I ran the script, I saw that all of the C* pods terminated, I expected either no changes at all or a rolling restart?
They then started coming back up:
|
…eters for delete --cascade
Add handling for kubectl client versions that support differing param…
@jdonenine Thanks for the testing and for the script changes!
I have started investigating this. My expectation (or hope) is that there would be no restart of pods. StatefulSets have a Note that even though the pods are started in parallel, Cassandra nodes are still started serially. This is because the management-api starts/stops Cassandra and cass-operator invokes the start operation on the management-api serially. I did a quick test. I created a CassandraDatacenter. After it became ready I scaled the cass-operator deployment down to 0. Then I deleted the CassandraDatacenter without cascading the delete. I then did a non-cascading delete of the StatefulSet. Then I recreated the StatefulSet. My Cassandra pods were not terminated. I think cass-operator is driving the pod restarts. I will investigate some more to see if I track down what is triggering the pod terminations. |
I figured out why pods are being recreated. When cass-operator initially creates the StatefulSet with
The above is output from @jdonenine We won't be able to avoid a restart without non-trivial changes to cass-operator. |
What this PR does:
Adds a shell script that recreates the CassandraDatacenter and underlying StatefulSets. Note that there is no downtime or data loss. Deletes do not cascade to the Cassandra pods. They remain up and running.
Which issue(s) this PR fixes:
Fixes #103
Checklist
┆Issue is synchronized with this Jira Bug by Unito