Skip to content

mgr/volumes: Keep mon caps if auth key has remaining mds/osd caps#59435

Merged
vshankar merged 3 commits intoceph:mainfrom
ebocchi:keep-mon-caps-for-remaining-subvolumes
Jun 25, 2025
Merged

mgr/volumes: Keep mon caps if auth key has remaining mds/osd caps#59435
vshankar merged 3 commits intoceph:mainfrom
ebocchi:keep-mon-caps-for-remaining-subvolumes

Conversation

@ebocchi
Copy link
Contributor

@ebocchi ebocchi commented Aug 26, 2024

Fixes: https://tracker.ceph.com/issues/67708
Signed-off-by: Enrico Bocchi enrico.bocchi@cern.ch

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

@github-actions github-actions bot added cephfs Ceph File System pybind labels Aug 26, 2024
@ebocchi ebocchi force-pushed the keep-mon-caps-for-remaining-subvolumes branch from b164f6c to 221a91b Compare August 26, 2024 11:44
@batrick batrick requested review from a team, kotreshhr and mchangir August 29, 2024 20:37
@batrick
Copy link
Member

batrick commented Aug 29, 2024

jenkins test make check

@batrick
Copy link
Member

batrick commented Aug 29, 2024

jenkins test make check arm64

Copy link
Contributor

@mchangir mchangir left a comment

Choose a reason for hiding this comment

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

LGTM

@mchangir
Copy link
Contributor

mchangir commented Sep 4, 2024

@ebocchi please add a test in qa/tasks/cephfs/test_volumes.py to confirm that the fix works

@ebocchi ebocchi force-pushed the keep-mon-caps-for-remaining-subvolumes branch from 221a91b to 44f21dc Compare October 16, 2024 09:42
@github-actions github-actions bot added the tests label Oct 16, 2024
@ebocchi ebocchi force-pushed the keep-mon-caps-for-remaining-subvolumes branch from 44f21dc to ee27143 Compare October 16, 2024 09:45
@ebocchi
Copy link
Contributor Author

ebocchi commented Oct 16, 2024

@mchangir Thanks for looking into this PR.
I have added the test as you requested.

@mchangir
Copy link
Contributor

@mchangir Thanks for looking into this PR. I have added the test as you requested.

Thanks Enrico, the test looks good.
Now, we need to get the test exercised in teuthology.

@vshankar vshankar self-assigned this Oct 22, 2024
@vshankar
Copy link
Contributor

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


# check mon caps for authid
expected_mon_caps = 'allow r'
full_caps = self._raw_cmd("auth", "get", "client.alice", "--format=json-pretty")
Copy link
Contributor

Choose a reason for hiding this comment

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

@ebocchi - this call needs to be wrapped around json.loads(), else accessing the json would fail as it fails in

https://pulpito.ceph.com/vshankar-2024-10-30_07:41:03-fs-wip-vshankar-testing-20241029.045257-debug-testing-default-smithi/7973229/

024-10-31T01:31:12.006 INFO:tasks.cephfs_test_runner:======================================================================
2024-10-31T01:31:12.006 INFO:tasks.cephfs_test_runner:ERROR: test_subvolume_deauthorize_with_shared_key (tasks.cephfs.test_volumes.TestSubvolumes)
2024-10-31T01:31:12.006 INFO:tasks.cephfs_test_runner:That mon caps are preserved when one cephx key authorized on multiple
2024-10-31T01:31:12.006 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2024-10-31T01:31:12.006 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2024-10-31T01:31:12.006 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/git.ceph.com_ceph-c_73c971683afc1322bab0582d2b64477919ac88b7/qa/tasks/cephfs/test_volumes.py", line 2855, in test_subvolume_deauthorize_with_shared_key
2024-10-31T01:31:12.006 INFO:tasks.cephfs_test_runner:    self.assertEqual(expected_mon_caps, full_caps[0]['caps']['mon'])
2024-10-31T01:31:12.006 INFO:tasks.cephfs_test_runner:TypeError: string indices must be integers
2024-10-31T01:31:12.006 INFO:tasks.cephfs_test_runner:
2024-10-31T01:31:12.006 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, missed that.
It should be fixed with 8c28c1e.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll put this to test. The commit can be squashed later when the change is ready to merge. Thx @ebocchi

@vshankar
Copy link
Contributor

cc @mchangir for QA testing.

@mchangir
Copy link
Contributor

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

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Jan 24, 2025
@vshankar vshankar removed the stale label Jan 24, 2025
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Mar 25, 2025
@ceph-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@vshankar
Copy link
Contributor

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

@mchangir I see https://tracker.ceph.com/issues/69038#note-2 and I guess the review is done and this is ready to merge, yes?

@github-actions github-actions bot removed the stale label Mar 25, 2025
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label May 24, 2025
@vshankar vshankar removed the stale label May 25, 2025
@vshankar
Copy link
Contributor

jenkins retest this please

@vshankar
Copy link
Contributor

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

vshankar added a commit to vshankar/ceph that referenced this pull request Jun 9, 2025
* refs/pull/59435/head:
	mgr/volumes: Fix json.loads for test on mon caps
	mgr/volumes: Add test for mon caps if auth key has remaining mds/osd caps
	mgr/volumes: Keep mon caps if auth key has remaining mds/osd caps

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Copy link
Contributor

@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

jenkins retest this please

@vshankar
Copy link
Contributor

jenkins test make check arm64

@vshankar
Copy link
Contributor

jenkins test api

vshankar added a commit to vshankar/ceph that referenced this pull request Jun 23, 2025
* refs/pull/59435/head:
	mgr/volumes: Fix json.loads for test on mon caps
	mgr/volumes: Add test for mon caps if auth key has remaining mds/osd caps
	mgr/volumes: Keep mon caps if auth key has remaining mds/osd caps

Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
ebocchi added 3 commits June 23, 2025 12:52
Signed-off-by: Enrico Bocchi <enrico.bocchi@cern.ch>
…caps

Signed-off-by: Enrico Bocchi <enrico.bocchi@cern.ch>
Signed-off-by: Enrico Bocchi <enrico.bocchi@cern.ch>
@vshankar vshankar force-pushed the keep-mon-caps-for-remaining-subvolumes branch from 8c28c1e to b008ef9 Compare June 23, 2025 07:23
@vshankar
Copy link
Contributor

rebased and push to get the jenkins tests working.

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.

6 participants