Skip to content

mds,client: feature to block clients from establishing sessions - #48720

Merged
vshankar merged 6 commits into
ceph:mainfrom
dparmar18:wip-57090
Mar 1, 2023
Merged

vshankar merged 6 commits into
ceph:mainfrom
dparmar18:wip-57090

Conversation

@dparmar18

@dparmar18 dparmar18 commented Nov 3, 2022 •

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/57090

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@github-actions github-actions Bot added the cephfs Ceph File System label Nov 3, 2022
@dparmar18 dparmar18 changed the title mds: do not allow session when recovery in progress mds: do not allow client session when recovery in progress Nov 3, 2022
@dparmar18
dparmar18 marked this pull request as ready for review November 3, 2022 12:12
@dparmar18

Copy link
Copy Markdown
Contributor Author

@batrick seems like we want to stop client session only in some scenarios, with my 1x1 with greg, we discussed about an asok cmd which can turn the flag true and stop any new sessions from client, does it sound good?

@vshankar
vshankar requested a review from a team November 4, 2022 05:19
@dparmar18

Copy link
Copy Markdown
Contributor Author

@batrick seems like we want to stop client session only in some scenarios, with my 1x1 with greg, we discussed about an asok cmd which can turn the flag true and stop any new sessions from client, does it sound good?

one more question arises is if this is feature is an admin command and in case of a severe recovery where all MDSs are either failed, stopped or damaged, will it still be able to serve it's purpose?

@xiubli

xiubli commented Nov 7, 2022

Copy link
Copy Markdown
Member

@batrick seems like we want to stop client session only in some scenarios, with my 1x1 with greg, we discussed about an asok cmd which can turn the flag true and stop any new sessions from client, does it sound good?

Instead of an asok cmd, which will be applied to only one MDS each time, how about adding one new configuration as 0d7e13d does?

@vshankar

vshankar commented Nov 7, 2022

Copy link
Copy Markdown
Contributor

@batrick seems like we want to stop client session only in some scenarios, with my 1x1 with greg, we discussed about an asok cmd which can turn the flag true and stop any new sessions from client, does it sound good?

Instead of an asok cmd, which will be applied to only one MDS each time, how about adding one new configuration as 0d7e13d does?

+1 - it makes sense to have the config in mds map.

@dparmar18
dparmar18 requested a review from a team as a code owner November 7, 2022 12:10
@dparmar18
dparmar18 force-pushed the wip-57090 branch 4 times, most recently from a1117ca to 821e357 Compare November 7, 2022 12:58
@dparmar18

Copy link
Copy Markdown
Contributor Author

thanks @lxbsz @vshankar for the suggestions, I've pushed changes, PTAL.

Comment thread src/mds/MDSMap.cc Resolved
@dparmar18
dparmar18 force-pushed the wip-57090 branch 2 times, most recently from 6dab846 to 933a121 Compare November 8, 2022 11:06
@vshankar

vshankar commented Nov 9, 2022

Copy link
Copy Markdown
Contributor

@dparmar18 - please add tests and ping back.

@dparmar18

Copy link
Copy Markdown
Contributor Author

@dparmar18 - please add tests and ping back.

ACK

@github-actions github-actions Bot added the tests label Nov 9, 2022
@dparmar18

Copy link
Copy Markdown
Contributor Author

@vshankar testcase added, PTAL.

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vshankar vshankar left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

API tests fail with

2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 712, in 
2022-12-28 10:16:47,812.812 INFO:__main__:    _validate_json(val[key], sub_schema, path + [key])
2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 711, in _validate_json
2022-12-28 10:16:47,812.812 INFO:__main__:    result = all(
2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 712, in 
2022-12-28 10:16:47,812.812 INFO:__main__:    _validate_json(val[key], sub_schema, path + [key])
2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 710, in _validate_json
2022-12-28 10:16:47,813.813 INFO:__main__:    raise _ValError('unknown keys: {}'.format(unknown_keys), path)
2022-12-28 10:16:47,813.813 INFO:__main__:tasks.mgr.dashboard.helper._ValError: In `input['fs_map']['filesystems'][0]['mdsmap']['flags_state']`: unknown keys: {'refuse_client_session'}

I think the new options needs a mention (somewhere) to satisfy dashboard test.

EDIT: Otherwise looks good (fs suite passes).

@dparmar18

Copy link
Copy Markdown
Contributor Author

API tests fail with

2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 712, in 
2022-12-28 10:16:47,812.812 INFO:__main__:    _validate_json(val[key], sub_schema, path + [key])
2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 711, in _validate_json
2022-12-28 10:16:47,812.812 INFO:__main__:    result = all(
2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 712, in 
2022-12-28 10:16:47,812.812 INFO:__main__:    _validate_json(val[key], sub_schema, path + [key])
2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 710, in _validate_json
2022-12-28 10:16:47,813.813 INFO:__main__:    raise _ValError('unknown keys: {}'.format(unknown_keys), path)
2022-12-28 10:16:47,813.813 INFO:__main__:tasks.mgr.dashboard.helper._ValError: In `input['fs_map']['filesystems'][0]['mdsmap']['flags_state']`: unknown keys: {'refuse_client_session'}

I think the new options needs a mention (somewhere) to satisfy dashboard test.

EDIT: Otherwise looks good (fs suite passes).

@vshankar Ah, have no idea about dashboard, will look into it. Thanks for pointing out.

@dparmar18
dparmar18 requested a review from a team as a code owner January 2, 2023 12:28
@dparmar18
dparmar18 requested review from avanthakkar and torchiaf and removed request for a team January 2, 2023 12:28
@dparmar18

Copy link
Copy Markdown
Contributor Author

@vshankar API tests passed

@dparmar18

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@vshankar

vshankar commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

jenkins retest this please

2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 712, in
2022-12-28 10:16:47,812.812 INFO:__main__:    _validate_json(val[key], sub_schema, path + [key])
2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 711, in _validate_json
2022-12-28 10:16:47,812.812 INFO:__main__:    result = all(
2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 712, in
2022-12-28 10:16:47,812.812 INFO:__main__:    _validate_json(val[key], sub_schema, path + [key])
2022-12-28 10:16:47,812.812 INFO:__main__:  File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 710, in _validate_json
2022-12-28 10:16:47,813.813 INFO:__main__:    raise _ValError('unknown keys: {}'.format(unknown_keys), path)
2022-12-28 10:16:47,813.813 INFO:__main__:tasks.mgr.dashboard.helper._ValError: In `input['fs_map']['filesystems'][0]['mdsmap']['flags_state']`: unknown keys: {'refuse_client_session'}

Fixes the above failure

Fixes: https://tracker.ceph.com/issues/57090
Signed-off-by: Dhairya Parmar <[email protected]>
@dparmar18

Copy link
Copy Markdown
Contributor Author

last updated fixed make check failure:

lint: commands[0] /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard> flake8
lint: commands[1] /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard> flake8 --config=tox.ini ../../../../qa/tasks/mgr/dashboard
�[0;36m../../../../qa/tasks/mgr/dashboard/test_health.py�[0m:�[1;33m60�[0m:�[1;32m36�[0m: �[1;31mE231�[0m missing whitespace after ':'
1     E231 missing whitespace after ':'
lint: exit 1 (1.05 seconds) /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard> flake8 --config=tox.ini ../../../../qa/tasks/mgr/dashboard pid=970179

@dparmar18

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

@vshankar

Copy link
Copy Markdown
Contributor

@dparmar18

Copy link
Copy Markdown
Contributor Author

Test ran successfully with this change - https://pulpito.ceph.com/vshankar-2023-02-24_02:11:45-fs-wip-vshankar-testing-20230222.025426-testing-default-smithi/

Failures are not related to this PR.

Awesome, do we know when this PR will be merged?

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vshankar
vshankar merged commit cca84e6 into ceph:main Mar 1, 2023
dparmar18 added a commit to dparmar18/ceph that referenced this pull request May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants