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

reef: mds: check relevant caps for fs include root_squash #57343

Merged
merged 14 commits into from
May 11, 2024

Conversation

batrick
Copy link
Member

@batrick batrick commented May 7, 2024

backport tracker: https://tracker.ceph.com/issues/65855


backport of #57192
parent tracker: https://tracker.ceph.com/issues/65733

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh

@batrick batrick requested review from a team as code owners May 7, 2024 20:02
@batrick batrick added this to the reef milestone May 7, 2024
@batrick batrick added the cephfs Ceph File System label May 7, 2024
@batrick batrick modified the milestones: reef, v18.2.3 May 7, 2024
@batrick
Copy link
Member Author

batrick commented May 7, 2024

This PR is under test in https://tracker.ceph.com/issues/65856.

@batrick batrick requested a review from a team May 7, 2024 20:04
@batrick
Copy link
Member Author

batrick commented May 8, 2024

jenkins test make check

@batrick
Copy link
Member Author

batrick commented May 8, 2024

jenkins test windows

batrick added a commit to batrick/ceph that referenced this pull request May 9, 2024
* refs/pull/57343/head:
	PendingReleaseNotes: add note on the client incompatibility health warning and feature bit
	doc/cephfs: add client_mds_auth_caps client feature bit
	doc/cephfs: add missing client feature bits
	doc/cephfs: document MDS_CLIENTS_BROKEN_ROOTSQUASH health error
	qa: add tests for MDS_CLIENTS_BROKEN_ROOTSQUASH
	mds: raise health warning if client lacks feature for root_squash
	mon/MDSMonitor: add note about missing metadata inclusion
	mds: check relevant caps for fs include root_squash
	mds: refactor out fs_name match in MDSAuthCaps
	qa: test for root_squash with multiple caps
	qa: pass kwargs to mount from remount
	qa: simplify update_attrs and only update relevant keys
	client: allow overriding client features
@batrick
Copy link
Member Author

batrick commented May 9, 2024

@batrick
Copy link
Member Author

batrick commented May 9, 2024

jenkins test make check

batrick added 11 commits May 9, 2024 08:25
For testing purposes.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit d9239f9)
So we can just pass the caller's kwargs to update_attrs.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 597ff3c)
So we can pass mntargs.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit afcbfc0)
Where the client has root_squash for one cap but not for another. The fs
without root_squash should not necessarily reject the client.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit bccc8ce)

Conflicts:
	qa/tasks/cephfs/test_admin.py: missing test
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 247b4fe)
When denying client reconnects because the MDS caps include root_squash and the
client features do not include CEPHFS_FEATURE_MDS_AUTH_CAPS_CHECK, ensure those
caps are only for the file system the MDS is joined to.

Fixes: https://tracker.ceph.com/issues/65733
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit f79ae86)
There is a "client_count" metadata on the health warning that apparently was
intended to be used for aggregating warnings but never was. Add a TODO item for
that.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 6517b70)
Rather than evict all clients lacking this feature bit, raise a health error
that pushes the administrator to address it. This avoids the surprise of having
all affected clients suddenly evicted in the cluster.

Fixes: https://tracker.ceph.com/issues/65733
Fixes: 954ed30
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 66ff5c9)

Conflicts:
	src/messages/MMDSBeacon.h: missing health beacon type
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 9d0ab23)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit b810bc9)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 79ba897)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 536b47c)
…rning and feature bit

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit e70f005)
@batrick
Copy link
Member Author

batrick commented May 9, 2024

rebased + removed some accidental additions to the PendingReleaseNotes

@batrick
Copy link
Member Author

batrick commented May 9, 2024

This PR is under test in https://tracker.ceph.com/issues/65884.

@batrick
Copy link
Member Author

batrick commented May 9, 2024

jenkins test make check

@batrick batrick force-pushed the wip-65855-reef branch 2 times, most recently from 735b54d to 0a9fb89 Compare May 10, 2024 13:41
batrick added a commit to batrick/ceph that referenced this pull request May 10, 2024
* refs/pull/57343/head:
	SQUASH
	reef: qa: do not use `fs authorize` for two fs
	PendingReleaseNotes: add note on the client incompatibility health warning and feature bit
	doc/cephfs: add client_mds_auth_caps client feature bit
	doc/cephfs: add missing client feature bits
	doc/cephfs: document MDS_CLIENTS_BROKEN_ROOTSQUASH health error
	qa: add tests for MDS_CLIENTS_BROKEN_ROOTSQUASH
	mds: raise health warning if client lacks feature for root_squash
	mon/MDSMonitor: add note about missing metadata inclusion
	mds: check relevant caps for fs include root_squash
	mds: refactor out fs_name match in MDSAuthCaps
	qa: test for root_squash with multiple caps
	qa: pass kwargs to mount from remount
	qa: simplify update_attrs and only update relevant keys
	client: allow overriding client features
This support was only recently added in squid.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
@batrick
Copy link
Member Author

batrick commented May 11, 2024

jenkins test make check

@batrick
Copy link
Member Author

batrick commented May 11, 2024

Copy link
Member Author

@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.

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>

Copy link
Member Author

@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.

Tested-by: Patrick Donnelly <pdonnell@redhat.com>

@batrick batrick merged commit b806bdb into ceph:reef May 11, 2024
9 of 10 checks passed
@batrick batrick deleted the wip-65855-reef branch May 11, 2024 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant