]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/smb: fix condition for smb earmark when cluster_id doesn't match 60044/head
authorAvan Thakkar <athakkar@redhat.com>
Sun, 29 Sep 2024 14:38:59 +0000 (20:08 +0530)
committerAvan Thakkar <athakkar@redhat.com>
Thu, 3 Oct 2024 17:18:32 +0000 (22:48 +0530)
commit9d1be68be0623045daee9958feff00678c0665a8
treee690174d23304d2cd3b17f6e5f883e43302b0807
parentd7a74a60764825edeb5e7d99435737917447fd1a
mgr/smb: fix condition for smb earmark when cluster_id doesn't match

This commit resolves an issue where accessing `earmark.split('.')[2]` would cause a
"list index out of range" error when the earmark is set to just "smb" without additional scopes.
The fix introduces a parsing function to safely handle earmarks, ensuring proper behavior
even when no cluster ID or additional scopes are present.

Fixes: https://tracker.ceph.com/issues/68342
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
src/pybind/mgr/smb/handler.py