WIP - rsync src mover - mount PVC as readOnly for ROX
Signed-off-by: Tesshu Flower [email protected]
Describe what this PR does In cases where the source PVC accessModes only supports ReadOnlyMany (ROX), mount the pvc as read-only in the ReplicationSource mover job.
- Not doing this for other PVCs as I have encountered permission errors when trying to access the volume mounted as read-only. So far testing with CephFS and ROX pvcs it does not have issues when mounting read-only.
Is there anything that requires special attention?
-
Attempts to avoid changing for most current scenarios by mounting read-only only for replicationSource (where we do not need to write to the PVC) and only when the source PVC access modes only allow ROX.
-
This change right now is confined to rsync - we could potentially attempt to do a similar change for other movers as well?
Related issues: https://github.com/backube/volsync/issues/404
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: tesshuflower
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [tesshuflower]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
/retest
Codecov Report
Merging #406 (020fe4b) into main (bbe8d9d) will increase coverage by
0.1%. The diff coverage is100.0%.
Additional details and impacted files
@@ Coverage Diff @@
## main #406 +/- ##
=======================================
+ Coverage 64.1% 64.2% +0.1%
=======================================
Files 44 44
Lines 5104 5120 +16
=======================================
+ Hits 3273 3289 +16
Misses 1634 1634
Partials 197 197
| Impacted Files | Coverage Δ | |
|---|---|---|
| controllers/mover/rsync/mover.go | 76.6% <100.0%> (+0.3%) |
:arrow_up: |
| controllers/utils/utils.go | 17.4% <100.0%> (+17.4%) |
:arrow_up: |
/cc @JohnStrunk
I think this one is pretty well tested now from the ramen side - What do you think?
/lgtm We should probably open issue(s) to apply this to restic and rclone also.
Created issues for restic and rclone: https://github.com/backube/volsync/issues/412 https://github.com/backube/volsync/issues/411