Skip to content
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

Backup aren't executed if multiple DCs with the same name exist in a namespace #1132

Closed
adejanovski opened this issue Dec 8, 2023 · 0 comments · Fixed by #1133
Closed

Backup aren't executed if multiple DCs with the same name exist in a namespace #1132

adejanovski opened this issue Dec 8, 2023 · 0 comments · Fixed by #1133
Assignees
Labels
bug Something isn't working done Issues in the state 'done'

Comments

@adejanovski
Copy link
Contributor

What happened?
Using DC name overrides, it is possible to create multiple DCs with the same name (the cassdc objects will have a different name, but the dc labels will be the same).
In this case, the MedusaBackupJob controller will list the Cassandra pods using just the Datacenter Label as selector, which will return pods from both clusters.
If the other DC doesn't have Medusa configured, the controller will fail the MedusaBackupJob reconcile saying the backup sidecar wasn't found. If the other DC does have Medusa, the backup will be started on the wrong cluster as well as the right one.

Did you expect to see something different?
The backup controller should filter pods by datacenter and cluster name to avoid confusion.

  • K8ssandra Operator version:

    v1.10.3

  • K8ssandra Operator Logs:

2023-12-08T14:35:46.836Z	ERROR	medusa is not deployed	{"controller": "medusabackupjob", "controllerGroup": "medusa.k8ssandra.io", "controllerKind": "MedusaBackupJob", "MedusaBackupJob": {"name":"backup-2023-12-08t14-29-23-227z","namespace":"testing-cluster-48o2037p"}, "namespace": "testing-cluster-48o2037p", "name": "backup-2023-12-08t14-29-23-227z", "reconcileID": "7576b2d8-3b53-4db8-a49a-6813ec50f62a", "medusabackupjob": "testing-cluster-48o2037p/backup-2023-12-08t14-29-23-227z", "CassandraDatacenter": {"namespace": "testing-cluster-48o2037p", "name": "test-dc1"}, "error": "the backup sidecar was not found"}
github.com/k8ssandra/k8ssandra-operator/controllers/medusa.(*MedusaBackupJobReconciler).Reconcile
	/workspace/controllers/medusa/medusabackupjob_controller.go:194
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:122
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:323
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:274
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235
@adejanovski adejanovski added the bug Something isn't working label Dec 8, 2023
@adejanovski adejanovski self-assigned this Dec 8, 2023
@adejanovski adejanovski moved this to In Progress in K8ssandra Dec 15, 2023
@adejanovski adejanovski added the in-progress Issues in the state 'in-progress' label Dec 15, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in K8ssandra Dec 20, 2023
@adejanovski adejanovski added done Issues in the state 'done' and removed in-progress Issues in the state 'in-progress' labels Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done Issues in the state 'done'
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant