-
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
CassandraTask updates #383
Conversation
… not just completed tasks
…on function to check for necessary parameters, add keyspace_name to rebuild and upgradesstables, add new command upgradesstables
…ethod, update CHANGELOG, deprecate old replace node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a very superficial review for now, I will continue tomorrow and try to dig deeper.
@@ -156,6 +160,7 @@ func waitForTaskCompletion(taskKey types.NamespacedName) *api.CassandraTask { | |||
|
|||
var _ = Describe("Execute jobs against all pods", func() { | |||
jobRunningRequeue = time.Duration(1 * time.Millisecond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: these casts are redundant.
FormatOutput(json) | ||
WithLabel(fmt.Sprintf("cassandra.datastax.com/datacenter=%s", dcName)) | ||
|
||
if completed { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: when completed
is false, I would have expected the control.k8ssandra.io/status
to NOT be equal to completed
. Here instead, we retrieve all tasks, both complete and incomplete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was the intention. The idea was to fetch all possible tasks to ensure no extra ones are created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename to onlyComplete
for clarity?
The test failure looks to be failure in test design or potentially a bug in the cass-operator (but not from this PR really). It seems the node is replaced correctly, but cass-operator puts itself in the "quiet period" and does not change the status of replace to complete. Maybe I'm replacing the same node twice too fast in the test and causing this issue. |
Some relevant parts from the log: Start of the process:
Then cass-operator notices it pretty quickly that pod has been deleted:
Eventually we'll notice:
That should update the status in cass-operator, but for some reason there's no error or update. |
That said, I think there's a bug. It comes in the form of "PreProcess" being run too many times and that could cause this to happen also. |
What this PR does:
Which issue(s) this PR fixes:
Fixes #387
Fixes #384
Fixes #327
Checklist