Topology Provider permissions briefly dropped during reconciliation when the reflector watch resets
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- kubernetes, rust
- Domain
- devops, infrastructure
Research direction
Start by tracing the HDFS operator's reconciliation path and the kube-rs Reflector watcher event handling, especially Store rebuilds and RoleBinding updates. Check how Init, InitApply, InitDone, Apply, Delete, and error events currently affect reconciliation. Done means reconciliations cannot act on an empty or partially populated Store, service-account permissions are preserved, and the work is eventually requeued.
Written by the indexing model from the issue text.
Description
Affected Stackable version
Any up to and including SDP 26.3.0
Affected Apache HDFS version
N/A
Current and expected behavior
In the HDFS operator (and perhaps any operator based on kube-rs), when the Reflector watch resets, the Store has to be rebuilt.
Reconciliations before the Store is fully consistent can lead to service accounts being dropped from (Cluster)RoleBindings. The leads to the Topoology Provider not being able to determine the topology (or possibly builds an incorrect topology?)
The expected behaviour is that the above doesn't happen 😅.
Possible solution
We can requeue reconciliations (at least for some operations) until the store is fully consistent.
Eg:
- On error: log error and return early
watcher::Event::Init-> the store is empty, waiting for InitApply events, requeue/return early.watcher::Event::InitApply-> store is partially populated, requeue/return early until InitDone.watcher::Event::InitDone-> store is populated, continue with reconcilewatcher::Event::Apply-> store is populated, continue with reconcilewatcher::Event::Delete-> store is populated, continue with reconcile
[!CAUTION]
I haven't checked to see whether we can and should requeue, or just return an error which bubbles up as a Result for the error_policy handler which logs and does requeues.
Regardless, we need to make sure it eventually is reconciled and not just ignored.
Additional context
My understanding of the problem/solution should be double checked with someone else.
[!TIP]
This might only be when the topology provider is used... but also seems like something that might affect other products that have components that interact with Kubernetes API in SDP generally
Environment
No response
Would you like to work on fixing this bug?
yes
- Dominant language
- Rust
- Stars
- 53
- Forks
- 9
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 10
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stackabletech/hdfs-operator
-
type/bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
stackabletech/hdfs-operator#773 ·
-
type/internal-debt
Difficulty 5/5 Over a week Newbie friendliness 15/100
stackabletech/hdfs-operator#769 ·
-
type/bug
Difficulty 3/5 1-2 days Newbie friendliness 52/100
stackabletech/hdfs-operator#763 ·
-
type/bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
stackabletech/hdfs-operator#712 ·
-
type/bug
Difficulty 3/5 1-2 days Newbie friendliness 42/100
stackabletech/hdfs-operator#686 ·
All issues in stackabletech/hdfs-operator
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100