Commit 9d1be68
committed
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 <[email protected]>1 parent d7a74a6 commit 9d1be68
1 file changed
+26
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
837 | 850 | | |
838 | 851 | | |
839 | 852 | | |
| |||
878 | 891 | | |
879 | 892 | | |
880 | 893 | | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
881 | 897 | | |
882 | 898 | | |
883 | 899 | | |
884 | 900 | | |
885 | 901 | | |
886 | | - | |
| 902 | + | |
887 | 903 | | |
888 | | - | |
889 | | - | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
890 | 910 | | |
891 | 911 | | |
892 | | - | |
| 912 | + | |
| 913 | + | |
893 | 914 | | |
| 915 | + | |
894 | 916 | | |
895 | 917 | | |
896 | 918 | | |
| |||
0 commit comments