Skip to content

mds: invalid id for client eviction is to be treated as success#59874

Merged
vshankar merged 1 commit intoceph:mainfrom
vshankar:wip-68132
Sep 30, 2024
Merged

mds: invalid id for client eviction is to be treated as success#59874
vshankar merged 1 commit intoceph:mainfrom
vshankar:wip-68132

Conversation

@vshankar
Copy link
Contributor

Introduced-by: 0ef5941
Fixes: http://tracker.ceph.com/issues/68132

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

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
  • jenkins test rook e2e

@vshankar vshankar added the cephfs Ceph File System label Sep 19, 2024
@vshankar vshankar requested review from a team and neesingh-rh September 19, 2024 06:31
@github-actions github-actions bot added the tests label Sep 19, 2024
Copy link
Contributor

@neesingh-rh neesingh-rh left a comment

Choose a reason for hiding this comment

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

I understand its breaking manila but don't you think client evict with invalid id needs to be handled, it seems like the command with invalid id is correct. Some user might again encounter this as a issue and we might have a ticket raised for this in future.

@vshankar
Copy link
Contributor Author

I understand its breaking manila but don't you think client evict with invalid id needs to be handled, it seems like the command with invalid id is correct. Some user might again encounter this as a issue and we might have a ticket raised for this in future.

Are you referring to the issue about all clients getting evicted or the specific issue of handling invalid client-id? Commit 0ef5941 correctly fixes the client eviction part (where all clients were getting evicted), but the commit additionally changes the behaviour of returning -ESRCH on invalid client-id which breaks manila. Also, its good to have commands idempotent, so running the same command twice, which results in the same output is actually a good thing.

@neesingh-rh
Copy link
Contributor

neesingh-rh commented Sep 20, 2024

I understand its breaking manila but don't you think client evict with invalid id needs to be handled, it seems like the command with invalid id is correct. Some user might again encounter this as a issue and we might have a ticket raised for this in future.

Are you referring to the issue about all clients getting evicted or the specific issue of handling invalid client-id? Commit 0ef5941 correctly fixes the client eviction part (where all clients were getting evicted), but the commit additionally changes the behaviour of returning -ESRCH on invalid client-id which breaks manila. Also, its good to have commands idempotent, so running the same command twice, which results in the same output is actually a good thing.

The tracker issue was about eviction of all clients when wrong flags like -h were passed which got fixed. I am referring to the issue of handling invalid client id, which i tried to fix too. With this patch whether the id passed is valid or invalid , user doesn't get to know what happened...until and unless he checks the client ls output whether number of clients remain same or not, because we don't even get any succesfull message after client eviction. If checking client ls again and again after running command to determine the validness of id is fine, then this is good to go.

@vshankar
Copy link
Contributor Author

jenkins test make check

@vshankar
Copy link
Contributor Author

I understand its breaking manila but don't you think client evict with invalid id needs to be handled, it seems like the command with invalid id is correct. Some user might again encounter this as a issue and we might have a ticket raised for this in future.

Are you referring to the issue about all clients getting evicted or the specific issue of handling invalid client-id? Commit 0ef5941 correctly fixes the client eviction part (where all clients were getting evicted), but the commit additionally changes the behaviour of returning -ESRCH on invalid client-id which breaks manila. Also, its good to have commands idempotent, so running the same command twice, which results in the same output is actually a good thing.

The tracker issue was about eviction of all clients when wrong flags like -h were passed which got fixed. I am referring to the issue of handling invalid client id, which i tried to fix too. With this patch whether the id passed is valid or invalid , user doesn't get to know what happened...until and unless he checks the client ls output whether number of clients remain same or not, because we don't even get any succesfull message after client eviction. If checking client ls again and again after running command to determine the validness of id is fine, then this is good to go.

Manila has also designed their workflow based on session evict not returning an error for invalid id, so, we'll have to keep that bit as it is :/

I know its a bit awkward, but we need to be good citizens with our users and also my earlier point about idempotent operations.

Introduced-by: 0ef5941
Fixes: http://tracker.ceph.com/issues/68132
Signed-off-by: Venky Shankar <vshankar@redhat.com>
@vshankar
Copy link
Contributor Author

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

Copy link
Contributor Author

@vshankar vshankar left a comment

Choose a reason for hiding this comment

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

@vshankar
Copy link
Contributor Author

jenkins test windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephfs Ceph File System tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants