From 74288183964c4d02a7528ab9fdf21c518930b401 Mon Sep 17 00:00:00 2001 From: Shwetha K Acharya Date: Wed, 21 May 2025 16:50:53 +0530 Subject: [PATCH] mgr/smb: Add new configs to share definition Inorder to support Microsoft Management Console (MMC) plugin feature, ceph manager must handle all fields supported by `add share command` and related smb.conf options. Added "comment" and "max connections" entries to the Samba configuration generated by the Ceph Manager module. These fields are required for MMC integration and will be made configurable in a future update. Signed-off-by: Shwetha K Acharya --- qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml | 2 ++ qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml | 2 ++ src/pybind/mgr/smb/handler.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml b/qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml index d92ccad96f2..cb5c78d514f 100644 --- a/qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml +++ b/qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml @@ -51,6 +51,8 @@ tasks: "kernel share modes" = "no" "read only" = "no" "browseable" = "yes" + "comment" = "" + "max connections" = "0" [globals.default.options] "load printers" = "no" "printing" = "bsd" diff --git a/qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml b/qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml index c8c91f908df..9f93c740a8e 100644 --- a/qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml +++ b/qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml @@ -50,6 +50,8 @@ tasks: "kernel share modes" = "no" "read only" = "no" "browseable" = "yes" + "comment" = "" + "max connections" = "0" [globals.default.options] "load printers" = "no" "printing" = "bsd" diff --git a/src/pybind/mgr/smb/handler.py b/src/pybind/mgr/smb/handler.py index e0dc9518902..73e635521bb 100644 --- a/src/pybind/mgr/smb/handler.py +++ b/src/pybind/mgr/smb/handler.py @@ -1196,6 +1196,8 @@ def _generate_share( 'browseable': ynbool(share.browseable), 'kernel share modes': 'no', 'x:ceph:id': f'{share.cluster_id}.{share.share_id}', + 'comment': '', + 'max connections': '0', } } if proxy_val: -- 2.47.3