Skip to content

Commit a64e1d5

Browse files
mgr/smb: enable clustering when setting up a cluster
Signed-off-by: John Mulligan <[email protected]>
1 parent 4ef7a48 commit a64e1d5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pybind/mgr/smb/handler.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
ShareRef = Union[resources.Share, resources.RemovedShare]
5757

5858
_DOMAIN = 'domain'
59+
_CLUSTERED = 'clustered'
5960
log = logging.getLogger(__name__)
6061

6162

@@ -1122,12 +1123,15 @@ def _generate_config(
11221123
for share in shares
11231124
}
11241125

1126+
instance_features = []
1127+
if cluster.is_clustered():
1128+
instance_features.append('ctdb')
11251129
cfg: Dict[str, Any] = {
11261130
'samba-container-config': 'v0',
11271131
'configs': {
11281132
cluster.cluster_id: {
11291133
'instance_name': cluster.cluster_id,
1130-
'instance_features': [],
1134+
'instance_features': instance_features,
11311135
'globals': ['default', cluster.cluster_id],
11321136
'shares': list(share_configs.keys()),
11331137
},
@@ -1168,6 +1172,8 @@ def _generate_smb_service_spec(
11681172
features = []
11691173
if cluster.auth_mode == AuthMode.ACTIVE_DIRECTORY:
11701174
features.append(_DOMAIN)
1175+
if cluster.is_clustered():
1176+
features.append(_CLUSTERED)
11711177
# only one config uri can be used, the input list should be
11721178
# ordered from lowest to highest priority and the highest priority
11731179
# item that exists in the store will be used.

0 commit comments

Comments
 (0)