You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root Cause
In operator's log, the function reconcile_configsecret.checkDatacenterNameAnnotation() is pointed out. More specifically, line 93 is where the panic happens. Go complains that we are trying to write to a nil map: "assignment to entry in nil map." Go is trying to write to secret.Annotations, which is not guaranteed to be present in a valid secret config. Therefore, trying to write to a nonexistent secret.Annotations causes the operator to crash.
Notice that in cass-operator's CRD documentation, when both config and configSecret are specified, cass-operator would prefer configSecret to config. Therefore, applying the second CR would ask cass-operator to switch from using config to configSecret as the application's config.
┆Issue is synchronized with this Jira Story by Unito
┆Reviewer: Alexander Dejanovski
┆Issue Number: CASS-66
The text was updated successfully, but these errors were encountered:
What happened?
When attempting to re-configure the CR with
spec.configSecret
property with a secret with noAnnotations
property,cass-operator
crashes and restarts.What did you expect to happen?
We expect the Cassandra container to correctly switch the application config to the one pointed by
configSecret
and keep the container running.How can we reproduce it (as minimally and precisely as possible)?
This bug can be reproduced by first deploying the cass-operator and run these steps:
secret.yaml
:spec.config
. Apply this CR.spec.configSecret
that points to the secret we created above. Apply this CR:cass-operator version
k8ssandra/cass-operator:v1.22.1
Kubernetes version
1.29.1
Method of installation
Helm
Anything else we need to know?
Root Cause
In operator's log, the function
reconcile_configsecret.checkDatacenterNameAnnotation()
is pointed out. More specifically, line 93 is where the panic happens. Go complains that we are trying to write to a nil map: "assignment to entry in nil map." Go is trying to write tosecret.Annotations
, which is not guaranteed to be present in a valid secret config. Therefore, trying to write to a nonexistentsecret.Annotations
causes the operator to crash.Cass-operator panic log:
Notice that in
cass-operator
's CRD documentation, when bothconfig
andconfigSecret
are specified,cass-operator
would preferconfigSecret
toconfig
. Therefore, applying the second CR would askcass-operator
to switch from usingconfig
toconfigSecret
as the application's config.┆Issue is synchronized with this Jira Story by Unito
┆Reviewer: Alexander Dejanovski
┆Issue Number: CASS-66
The text was updated successfully, but these errors were encountered: