stackabletech / stackabletech/nifi-operator

Handle graceful cluster shrinking

Open
#314 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
48
Forks
12
Avg merge
11h 26m
Merged PRs (30d)
10

Description

Affected version

0.6.0

Current and expected behavior

Currently when a NifiCluster is shrunk in size, the user has to make sure that the node(s) to be removed have been disconnected and drained manually before triggering the shrinking.

Ideally we'd want the operator to use the NiFi Rest api to perform these administrative tasks automatically.

Possible solution

The operator needs to be able to track, whether an action is about to shrink the cluster, determine which pods are going to be removed and trigger the necessary action via the NiFi api for these pods.

In order to do this we'll probably have to track "current pods" in the status of the NifiCluster object, in order for the operator to be able to determine if the new version of the object signifies a shrinking action.
Once this check is triggered, the operator then needs to check if all nodes are drained. If this is the case the reconciliation can proceed normally, if not, drain tasks need to be started for all pods / checked if tasks are already running. Then the operator can requeue, and will simply keep running this check until all tasks are done.

Additional context

No response

Environment

No response

Would you like to work on fixing this bug?

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the NifiCluster reconciliation and status handling to understand how a requested cluster-size change is detected. Trace how pods are selected and how NiFi REST API actions could be awaited across reconciliation; done means removed nodes are disconnected and drained automatically before shrinking proceeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, rust
Domain
distributed-systems, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.