-
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 reconcile fails with json unmarshal error #587
Comments
Just found a test is being added here https://github.com/k8ssandra/cass-operator/pull/584/files#diff-8975636a650e4f693ea9fc9c9870311666765068357bdaabc06bc7573c41457b If what I described is correct then this test might be failing exactly because of type mismatch @burmanm |
Hey, this was a bug in the management-api release 0.1.69. If you update your management-api image (the Cassandra image) it should solve this issue. Basically refetching the Pod's image should be enough. |
That's right, thank you @burmanm! Now I can see it was updated to string here k8ssandra/management-api-for-apache-cassandra@c46d8f9 I wonder if it should be updated in the api doc as well https://github.com/k8ssandra/management-api-for-apache-cassandra/blob/master/management-api-server/doc/openapi.json#L2153-L2156? I'll close the issue, thanks again. |
No, the "int64" is correct there, that's the type of data that's in the field. But JSON can't serialize int64, instead it serializes all the numbers as float64, so that would cause certain numbers to be incorrectly serialized/deserialized. Thus, they need to be serialized as strings to retain all the information. |
What happened?
I have created a task
But I found it only triggered rebuild on a single pod.
What did you expect to happen?
I expected task to be triggered on all 3 pods of my datacenter.
How can we reproduce it (as minimally and precisely as possible)?
Create a task to rebuild datacenter, check operator's logs.
cass-operator version
v1.17.2
Kubernetes version
v1.27.4
Method of installation
Helm
Anything else we need to know?
Here is my findings:
When I create a task, it's being created on the pod-0:
Since
.spec.concurrencyPolicy
isForbid
, task is being executed on the first pod and is waiting to completion status sent back before proceeding with the next pod.On cass-operator pod I can see following logs (I have omitted pod json output):
So the reason seems to be here:
Struct:
cass-operator/pkg/httphelper/client.go
Lines 115 to 122 in 34e2ae6
And it's being unmarshalled here:
cass-operator/pkg/httphelper/client.go
Line 1088 in 34e2ae6
it gets data from
/api/v0/ops/executor/job?job_id=%s
If I curl API I get a number, not a string:
And API doc says
submit_time
is an integer, not string: https://github.com/k8ssandra/management-api-for-apache-cassandra/blob/master/management-api-server/doc/openapi.json#L2153-L2160Am I missing something obvious or this is a bug? I'm doubt as this code was not changed for a quite a long time.
Thank you!
The text was updated successfully, but these errors were encountered: