feat(nfs-server): change shared filesystem ownership and mode#125
Merged
mittachaitu merged 20 commits intoopenebs-archive:developfrom Dec 14, 2021
Merged
feat(nfs-server): change shared filesystem ownership and mode#125mittachaitu merged 20 commits intoopenebs-archive:developfrom
mittachaitu merged 20 commits intoopenebs-archive:developfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #125 +/- ##
===========================================
+ Coverage 49.79% 50.12% +0.32%
===========================================
Files 38 38
Lines 2705 2789 +84
===========================================
+ Hits 1347 1398 +51
- Misses 1255 1285 +30
- Partials 103 106 +3
Continue to review full report at Codecov.
|
3b6b082 to
bee14ca
Compare
mittachaitu
reviewed
Nov 29, 2021
Contributor
mittachaitu
left a comment
There was a problem hiding this comment.
Looks good but good to have the following things:
- Integration test for a new feature
- Documentation and helm changes as separate PR(also update vanilla YAML's about new feature with comments). If we have a document along with this PR then users may assume feature exists in a released version which don't want to happen, so good to have different PR for release related work.
mittachaitu
reviewed
Dec 9, 2021
Contributor
mittachaitu
left a comment
There was a problem hiding this comment.
Provided few minnor comments
bd1bfa3 to
f3a00af
Compare
Member
Author
|
This PR depends on #129 . |
2b6c514 to
8b2aa83
Compare
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
…tartup script Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
…unnecessary comparisons, add unit tests Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
…imize logic in dataConfigToMap() method, log message in GetFsMode() and GetFsGID() methods, nil pointer check in BDD test, remove unused method Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
a239356 to
6d4c330
Compare
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
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.
Why is this PR required? What issue does it fix?:
Resolves: #122
This PR allows a user to change the ownership and file mode parameters of the filesystem shared using NFS.
What this PR does?:
This PR introduces the FilePermissions
cas.openebs.io/configPersistentVolumeClaim key. The data keys included within this config key are UID, GID and mode. The openebs-nfs-provisioner process sets the values from these PersistentVolumeClaim keys into the ENVs FILEPERMISSIONS_UID, FILEPERMISSIONS_GID and FILEPERMISSIONS_MODE.The /nfs-server-container/nfsd.sh script issues
chmodandchowncommands to change the ownership and file mode of the shared filesystem directory (backend volume at /nfsshare). The checking criteria is similar to the Kubernetes fsGroupChangePolicy OnRootMismatch.NOTE: This also generates logs which announce the deprecation of the FSGID
cas.openebs.io/configoption in future releases. FSGID-like changes can be accomplished with FilePermissions. Instructions for this have been furnished in the user documentation(#128).If 'FSGID' is specified, and 'GID' and/or 'mode' FilePermissions keys are also specified, this is treated as an invalid input and provisioning fails. This is done to keep the file permissions strictly declarative.
Sample PersistentVolumeClaim:
Does this PR require any upgrade changes?:
No.