Skip to content

filter resources correctly in a multi-controller environment#302

Closed
llamerada-jp wants to merge 4 commits into
mainfrom
7388-multi-controller-2
Closed

filter resources correctly in a multi-controller environment#302
llamerada-jp wants to merge 4 commits into
mainfrom
7388-multi-controller-2

Conversation

@llamerada-jp

Copy link
Copy Markdown
Contributor

Previously, whether a MantleBackup should be processed by this controller was decided deep in getSnapshotTarget via checkPVCInManagedCluster. Therefore, unnecessary processing was being performed.

Replace the (ctrl.Result, error) return convention used throughout
MantleBackupReconciler's helper methods with a single *reconcileResult
value. reconcileResult encodes exactly one of four outcomes: success,
requeue, error, or "continue" (nil), which makes the control flow of
each step explicit and removes the need to juggle ctrl.Result and error
side by side at every call site.

Signed-off-by: Yuji Ito <llamerada.jp@gmail.com>
Previously, whether a MantleBackup should be processed by this controller
was decided deep in getSnapshotTarget via checkPVCInManagedCluster.
Therefore, unnecessary processing was being performed.

Signed-off-by: Yuji Ito <llamerada.jp@gmail.com>
The local-backup-target-pvc-uid label is now attached in reconcileLocalBackup
before provisionRBDSnapshot is called, so attaching the same label again in
provisionRBDSnapshot is redundant. Remove it together with the extra
Get/Update round-trip it required.

Signed-off-by: Yuji Ito <llamerada.jp@gmail.com>
add the label for cluster id for CreateOrUpdatePVC request
- send cluster id from primary as the label
- check it on secondary server when received the request

Signed-off-by: Yuji Ito <llamerada.jp@gmail.com>
@llamerada-jp llamerada-jp deleted the 7388-multi-controller-2 branch June 30, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant