volsync: Add MoverConfig to local ReplicationSource#1
Open
Conversation
Fix VolSync mover configuration for locally created ReplicationSources during failover. This PR ensures that the local ReplicationSource (RS)i created during failover—used for syncing data from the ReplicationDestination snapshot back to the peer cluster—correctly inherits the configured MoverConfig. Previously, MoverSecurityContext and MoverServiceAccount were not propagated to the local RS, causing mover pods to start with incorrect permissions or without the required ServiceAccount. This led to permission denied errors, mover startup failures, and failover operations getting stuck. The fix updates reconcileLocalRS() in volsync/vshandler.go to properly initialize and apply the full MoverConfig to the locally generated RS specification. Signed-off-by: pruthvitd <prd@redhat.com>
8f2ac3d to
697a01a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
During VolSync rollback operations (failover scenarios), the local
ReplicationSource created by reconcileLocalRS() was missing MoverConfig
settings. This caused the local RS mover pods to run with default
security contexts instead of the configured ones, leading to permission
errors when accessing PVCs with specific security requirements (e.g.,
fsGroup, runAsUser, custom service accounts).
Root Cause:
The reconcileLocalRS() function did not accept or apply MoverConfig
parameters, unlike the primary RS creation path in createOrUpdateRS()
which properly handles MoverConfig.
Solution:
Apply MoverConfig to local RS RsyncTLS spec using the same pattern
as createOrUpdateRS()