Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added forcecephkernelclient as startup parameter to force enabling ceph #664

Merged
merged 2 commits into from
Oct 16, 2019
Merged

Added forcecephkernelclient as startup parameter to force enabling ceph #664

merged 2 commits into from
Oct 16, 2019

Conversation

shaas
Copy link
Contributor

@shaas shaas commented Oct 1, 2019

Added "forcecephkernelclient" as parameter to force the use of the ceph kernel client for kernels < 4.17

This is need as SUSE Enterprise Storage 6 does not support fuse but ceph quotas got back-ported to kernels < 4.17

Signed-off-by: Stefan Haas shaas@suse.com

@humblec
Copy link
Collaborator

humblec commented Oct 1, 2019

This is need as SUSE Enterprise Storage 6 does not support fuse but ceph quotas got back-ported to kernels < 4.17

@shaas are you saying SUSE kernel did a backport of quota support for kernels < 4.17 ?

@humblec
Copy link
Collaborator

humblec commented Oct 1, 2019

We have some concerns on enabling kernel client without quota support as mentioned in #617. If SUSE kernel support it, I would rather go for suse specific kernel check and enablement than a general one.

@denisok
Copy link

denisok commented Oct 1, 2019

any kernel could support needed cephfs client if it would be back ported there. It is probably falls down from CSI driver level to know such things.
As there is no ways to check such capabilities from cephfs client, the better approach is to get parameter that could be set by other tools that would know such information (distro specific).

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 1, 2019

@batrick @ajarr PTAL

@BlaineEXE
Copy link

#617 is a good instance of a user wanting this feature. I see a lot of good arguments here for why a hard limit on 4.17 is a poor choice, like here: #623 (comment)

Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kernel version checks are good for weak enforcement but an override should exist too. I'm cool with this change.

cc @jtlayton @ajarr

Copy link
Collaborator

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also update the doc for this new variable here https://github.com/ceph/ceph-csi/blob/master/docs/deploy-cephfs.md#configuration

@shaas
Copy link
Contributor Author

shaas commented Oct 2, 2019

can you also update the doc for this new variable here https://github.com/ceph/ceph-csi/blob/master/docs/deploy-cephfs.md#configuration

Done

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 3, 2019

7.401µs, max_per_file_from_linter: 3.717µs, diff: 3.568µs, exclude-rules: 3.031µs, skip_files: 1.471µs
pkg/cephfs/volumemounter.go:73:6: S1002: should omit comparison to bool constant, can be simplified to conf.ForceKernelClient (gosimple)
if conf.ForceKernelClient == true || majorVers >= 4 && minorVers >= 17 {
^
@shaas we have CI failure can you please fix it, Thanks

@shaas
Copy link
Contributor Author

shaas commented Oct 4, 2019

7.401µs, max_per_file_from_linter: 3.717µs, diff: 3.568µs, exclude-rules: 3.031µs, skip_files: 1.471µs
pkg/cephfs/volumemounter.go:73:6: S1002: should omit comparison to bool constant, can be simplified to conf.ForceKernelClient (gosimple)
if conf.ForceKernelClient == true || majorVers >= 4 && minorVers >= 17 {
^
@shaas we have CI failure can you please fix it, Thanks

Done

cmd/cephcsi.go Outdated
@@ -63,6 +63,7 @@ func init() {

// cephfs related flags
flag.StringVar(&conf.MountCacheDir, "mountcachedir", "", "mount info cache save dir")
flag.BoolVar(&conf.ForceKernelClient, "forcecephkernelclient", false, "enable Ceph Kernel clients on kernel < 4.17 which support quotas")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which does not support quotas?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the flag is to enable the kernel client on kernels with version <4.17 that do support quotas (via backported patches). All kernels >=4.17 support quotas and don't need the flag

pkg/util/util.go Outdated
// rbd related flag
Containerized bool // whether run as containerized

// cephfs related flags
ForceKernelClient bool // force to use the ceph kernel client even if the kernel is < 4.17
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isnt it better to put the fied as "forcekcephfs" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it

ajarr
ajarr previously approved these changes Oct 7, 2019
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 9, 2019

@humblec anything else is pending on this one?

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 10, 2019

Fixes: #664

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 10, 2019

@nixpanic @humblec PTAL

Copy link
Collaborator

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@humblec
Copy link
Collaborator

humblec commented Oct 10, 2019

@Madhu-1 there were some unanswerd review comments

@Madhu-1 Madhu-1 added the DNM DO NOT MERGE label Oct 10, 2019
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 10, 2019

added DNM till we get answers for @humblec question, @shaas can you please take a look, would like to pull this for 1.2.2 release

@Madhu-1 Madhu-1 self-requested a review October 10, 2019 05:50
Copy link
Collaborator

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update the target branch to master, instead of release-v1.2.0

@humblec
Copy link
Collaborator

humblec commented Oct 10, 2019

All, this was possible in 1.0.0 does not justify much and if we allow kcephfs without quota support we are actually against kubernetes norms where it says the user should get "atleast requested space". however considering this is a concern from many users, the best bet would be "defaulting to false" which this PR does and adding "extra" documentation in "README" about this functionality with disclaimers in place which says, this is not recommended/supported if the kernel does not support quota.
@shaas we have to document this in README before getting this PR in

@shaas shaas changed the base branch from release-v1.2.0 to master October 10, 2019 09:32
@mergify mergify bot dismissed ajarr’s stale review October 10, 2019 10:16

Pull request has been modified.

README.md Outdated
@@ -77,6 +77,9 @@ NOTE:
compatible changes in the future, and is thus not recommended
for production use.

`NOTE` : The parameter `-forcecephkernelclient` enables the Kernel CephFS mounter on kernels < 4.17.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this Note should go to https://github.com/ceph/ceph-csi/blob/master/docs/deploy-cephfs.md which talks about cephfs deployment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!
Moved this line

@Madhu-1 Madhu-1 removed the DNM DO NOT MERGE label Oct 10, 2019
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 10, 2019

@shaas static check is failing

mdl --style scripts/mdl-style.rb ./docs/deploy-rbd.md 
mdl --style scripts/mdl-style.rb ./docs/deploy-cephfs.md 
./docs/deploy-cephfs.md:65: MD012 Multiple consecutive blank lines
A detailed description of the rules is available at https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md
mdl --style scripts/mdl-style.rb ./docs/coding.md 
mdl --style scripts/mdl-style.rb ./e2e/README.md 
mdl --style scripts/mdl-style.rb ./README.md 
mdl --style scripts/mdl-style.rb ./charts/ceph-csi-cephfs/README.md 
mdl --style scripts/mdl-style.rb ./charts/ceph-csi-rbd/README.md 
Makefile:45: recipe for target 'static-check' failed
make: *** [static-check] Error 123
The command "make static-check" exited with 2.

@shaas
Copy link
Contributor Author

shaas commented Oct 10, 2019

please update the target branch to master, instead of release-v1.2.0

Done

@shaas shaas requested a review from Madhu-1 October 10, 2019 12:52
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 10, 2019

@humblec PTAL

@shaas
Copy link
Contributor Author

shaas commented Oct 14, 2019

Is there anything still needed/missing from my side?

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 14, 2019

@humblec @ShyamsundarR @nixpanic PTAL

@humblec
Copy link
Collaborator

humblec commented Oct 16, 2019

@shaas we have to rebase this PR .

@mergify mergify bot merged commit 6a2717c into ceph:master Oct 16, 2019
@shaas shaas deleted the ceph_kernel_parameter branch October 16, 2019 13:52
hswong3i added a commit to alvistack/ansible-role-kube_csi_cephfs that referenced this pull request Oct 24, 2019
hswong3i added a commit to alvistack/ansible-role-kube_csi_rbd that referenced this pull request Oct 24, 2019
hswong3i added a commit to alvistack/ansible-collection-kubernetes that referenced this pull request Oct 24, 2019
hswong3i added a commit to alvistack/ansible-role-kube_csi_cephfs that referenced this pull request Oct 24, 2019
hswong3i added a commit to alvistack/ansible-role-kube_csi_rbd that referenced this pull request Oct 24, 2019
This reverts commit 2453156.
hswong3i added a commit to alvistack/ansible-collection-kubernetes that referenced this pull request Oct 24, 2019
jonasrutishauser added a commit to jonasrutishauser/ceph-csi that referenced this pull request Feb 18, 2020
Support ceph#664 in the helm chart.

Signed-off-by: Jonas Rutishauser <jonas.rutishauser@alumni.ethz.ch>
jonasrutishauser added a commit to jonasrutishauser/ceph-csi that referenced this pull request Feb 20, 2020
Support ceph#664 in the helm chart.

Signed-off-by: Jonas Rutishauser <jonas.rutishauser@alumni.ethz.ch>
jonasrutishauser added a commit to jonasrutishauser/ceph-csi that referenced this pull request Feb 25, 2020
Support ceph#664 in the helm chart.

Signed-off-by: Jonas Rutishauser <jonas.rutishauser@alumni.ethz.ch>
Madhu-1 pushed a commit that referenced this pull request Mar 3, 2020
Support #664 in the helm chart.

Signed-off-by: Jonas Rutishauser <jonas.rutishauser@alumni.ethz.ch>
mergify bot pushed a commit that referenced this pull request Mar 3, 2020
Support #664 in the helm chart.

Signed-off-by: Jonas Rutishauser <jonas.rutishauser@alumni.ethz.ch>
(cherry picked from commit 9d7b50d)
mergify bot pushed a commit that referenced this pull request Mar 3, 2020
Support #664 in the helm chart.

Signed-off-by: Jonas Rutishauser <jonas.rutishauser@alumni.ethz.ch>
(cherry picked from commit 9d7b50d)
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.

9 participants