-
Notifications
You must be signed in to change notification settings - Fork 179
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
Scylla Manager controller will update tasks despite no changes in spec #1827
Comments
Although this can be worked around by tweaking the deep equality test, the ideal approach would be to annotate the tasks with a checksum of the most recently sent spec. There's an existing feature request which would allow us to implement this: scylladb/scylla-manager#3645. |
Another issue is that this goes past the unit tests since they use a crafted "manager state", which doesn't correspond to what would normally come from the manager client. Should we maybe use a mock client instead? I can't come up with a way to verify this trivially in our e2e suite. |
not sure if that's enough at at some point we'd collide with user's note. annotations like map would be best.
mock are usually not good when it come to the level of API admission / defaulting / conversion
I suppose a progressing condition might show this |
We can't use them from the manager controller, can we? |
manager controller already sets status on scyllaclusters, it can add its own progressing condition - if it detects a change, it sets progressing, if next sync detects no change, it sets false |
Sure, I wasn't proposing we do exactly this, only pointing out there's already a need for it - labels/annotations map definitely seems more fitting. There's even another issue for clusters already: scylladb/scylla-manager#3219. It's closer to what we need so I'll update this one instead. |
Just for the record this is waiting for scylladb/scylla-manager#3219. The manager team agreed to add a metadata/labels map to the clusters/tasks API and we'll use that to decide if the operator controls the given object and to compare hashes of the objects to decide if we need to update them. It won't come in 3.2.8 though, we'll have to wait a bit longer. |
The Scylla Operator project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
/lifecycle stale |
/remove-lifecycle stale |
scylladb/scylla-manager#3219 was closed as completed with scylladb/scylla-manager#3934, so this is no longer blocked on SM. |
What happened?
Scylla Manager controller decides to update the tasks defined in ScyllaCluster's spec by checking deep equality between the definition and the task obtained from the Manager's state.
scylla-operator/pkg/controller/manager/sync_action.go
Line 157 in f2336ee
Since some fields are converted when translating them to requests to Scylla Manager, but not when converting them back, the deep equality will always be false in some cases. This in turn means that tasks can be updated indefinitely in a loop, despite their specification not changing. This causes superfluous, additional load to Scylla Manager and the controller.
The same situation can also be caused by the Manager defaulting some fields or not returning their values in API call responses.
Example logs:
In the above scenario the infinite updates come from the discrepancy of
small_table_threshold
value between ScyllaCluster's spec and the Manager's state, due to the value being converted before sending the request.What did you expect to happen?
The tasks should not be updated when there are no changes in their spec.
How can we reproduce it (as minimally and precisely as possible)?
Schedule any task using ScyllaCluster's API.
Scylla Operator version
master
Kubernetes platform name and version
n/a
Please attach the must-gather archive.
n/a
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: