Skip to content

mgr/cephadm: add feature-based REDEPLOY logic for SMB services - #69907

Merged
phlogistonjohn merged 1 commit into
ceph:mainfrom
Sodani:shsodani_ceph_rgw_new_module
Jul 10, 2026
Merged

phlogistonjohn merged 1 commit into
ceph:mainfrom
Sodani:shsodani_ceph_rgw_new_module

Conversation

@Sodani

@Sodani Sodani commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Implement intelligent action selection for SMB daemon updates by tracking feature changes as dependencies. When SMB service features change (e.g., adding cephfs-proxy, remote-control, keybridge), the system now triggers a REDEPLOY instead of RECONFIG, as these changes require container structure modifications.

Fixes: https://tracker.ceph.com/issues/77762

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)

Comment thread src/pybind/mgr/cephadm/services/smb.py Resolved
Comment thread src/pybind/mgr/cephadm/services/smb.py Resolved
@avanthakkar avanthakkar changed the title mgr/cephadm/smb: Add feature-based REDEPLOY logic for SMB services mgr/cephadm: add feature-based REDEPLOY logic for SMB services Jul 2, 2026
@Sodani
Sodani force-pushed the shsodani_ceph_rgw_new_module branch 2 times, most recently from 4f97911 to 59a355d Compare July 2, 2026 13:09
@Sodani
Sodani marked this pull request as ready for review July 2, 2026 16:10
@Sodani
Sodani requested review from a team as code owners July 2, 2026 16:10

@phlogistonjohn phlogistonjohn left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally lgtm.
Avan's sambacc fix (for samba-in-kubernetes/sambacc#208) has been merged and I rebuilt samba-container. Please retest with the latest samba container and see if that resolves the issue loading the config we discussed earlier.

@Sodani
Sodani force-pushed the shsodani_ceph_rgw_new_module branch 2 times, most recently from aac157b to bcc6451 Compare July 3, 2026 06:29
@avanthakkar

Copy link
Copy Markdown
Contributor

jenkins test api

@avanthakkar avanthakkar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

@avanthakkar

Copy link
Copy Markdown
Contributor

Generally lgtm. Avan's sambacc fix (for samba-in-kubernetes/sambacc#208) has been merged and I rebuilt samba-container. Please retest with the latest samba container and see if that resolves the issue loading the config we discussed earlier.

The issue seems to be resolved now. I see correct config loaded in net conf list. @Sodani Can you verify?

@Sodani

Sodani commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Generally lgtm. Avan's sambacc fix (for samba-in-kubernetes/sambacc#208) has been merged and I rebuilt samba-container. Please retest with the latest samba container and see if that resolves the issue loading the config we discussed earlier.

The issue seems to be resolved now. I see correct config loaded in net conf list. @Sodani Can you verify?

Yes I have verified. This fix is working with latest samba container build. Thanks.

@phlogistonjohn phlogistonjohn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@phlogistonjohn

Copy link
Copy Markdown
Contributor

@avanthakkar will you run teuthology with this PR?

@avanthakkar

Copy link
Copy Markdown
Contributor

@avanthakkar will you run teuthology with this PR?

Yes infact I have triggered combined build of this PR and other which depends on this with similar changes for rgw_creds_uri

@avanthakkar

Copy link
Copy Markdown
Contributor

@avanthakkar will you run teuthology with this PR?

Yes infact I have triggered combined build of this PR and other which depends on this with similar changes for rgw_creds_uri

Just started :
https://pulpito-ng.ceph.com/runs/avan-2026-07-03_13:35:10-orch:cephadm:smb-wip-athakkar2-testing-2026-07-03-1648-distro-default-trial

@avanthakkar

Copy link
Copy Markdown
Contributor

I see 3 failure about CEPHADM_FAILED_DAEMON and this seems related. From what I checked in logs there seems to be race between re-deploy and smb cluster teardown which causes ceph health issues. I'm looking into this further to understand issue and provide a fix

Comment thread src/pybind/mgr/cephadm/services/smb.py Resolved
Comment thread src/pybind/mgr/cephadm/services/smb.py Resolved
Comment thread src/pybind/mgr/cephadm/services/smb.py Resolved
Comment thread src/pybind/mgr/cephadm/services/smb.py Resolved
@Sodani
Sodani force-pushed the shsodani_ceph_rgw_new_module branch from bcc6451 to bcec7e6 Compare July 8, 2026 10:21
@Sodani

Sodani commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor Author

I pulled the latest changes to my branch, seems there are changes in choose_next_action parameter by recent commit c20ba11 and updated the latest diff (addressed Anoop's comment regarding reuse the code through super) . Please review . Verified in my setup as well.

@anoopcs9 anoopcs9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, thanks.

@phlogistonjohn

Copy link
Copy Markdown
Contributor

@Sodani

Sodani commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

While testing the current fix on the Exo cluster environment, I found another issue. The dependency list is being compared without considering ordering, so a sorted vs. unsorted dependency list is detected as a change. As a result, cephadm continuously triggers SMB daemon reconfiguration, causing the SMB containers to fail.

For reference, the logs show:

Jul 09 17:53:07 ceph1 ceph-mgr[29178]: [cephadm INFO cephadm.services.cephadmservice] Reconfigure wanted smb.ceph-sec: deps ['smb+meta:ceph_cluster_config.exo=sha256:f358fe62149da4ca586c35726776c346188b8144637b6dc5a439237b9ead2c2d', 'smb+field:features=clustered'] -> ['smb+field:features=clustered', 'smb+meta:ceph_cluster_config.exo=sha256:f358fe62149da4ca586c35726776c346188b8144637b6dc5a439237b9ead2c2d'] (diff set())

I'm working on a fix by sorting the dependency list before comparison. Once I verify the fix on the Exo cluster, I'll update the PR.

@avanthakkar

Copy link
Copy Markdown
Contributor

While testing the current fix on the Exo cluster environment, I found another issue. The dependency list is being compared without considering ordering, so a sorted vs. unsorted dependency list is detected as a change. As a result, cephadm continuously triggers SMB daemon reconfiguration, causing the SMB containers to fail.

For reference, the logs show:

Jul 09 17:53:07 ceph1 ceph-mgr[29178]: [cephadm INFO cephadm.services.cephadmservice] Reconfigure wanted smb.ceph-sec: deps ['smb+meta:ceph_cluster_config.exo=sha256:f358fe62149da4ca586c35726776c346188b8144637b6dc5a439237b9ead2c2d', 'smb+field:features=clustered'] -> ['smb+field:features=clustered', 'smb+meta:ceph_cluster_config.exo=sha256:f358fe62149da4ca586c35726776c346188b8144637b6dc5a439237b9ead2c2d'] (diff set())

I'm working on a fix by sorting the dependency list before comparison. Once I verify the fix on the Exo cluster, I'll update the PR.

Good catch! I just checked nfs side and they do sort deps in get_dependencies . I think we need to do the same

Implement intelligent action selection for SMB daemon updates by tracking
feature changes as dependencies. When SMB service features change (e.g.,
adding cephfs-proxy, remote-control, keybridge), the system now triggers
a REDEPLOY instead of RECONFIG, as these changes require container
structure modifications.

Fixes: https://tracker.ceph.com/issues/77762

Signed-off-by: Shweta Sodani <[email protected]>
@Sodani
Sodani force-pushed the shsodani_ceph_rgw_new_module branch from bcec7e6 to 3c39960 Compare July 9, 2026 14:51
@Sodani

Sodani commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

I updated a PR with latest issue fix. Please check .

@avanthakkar

Copy link
Copy Markdown
Contributor

I updated a PR with latest issue fix. Please check .

Latest changes LGTM , thanks!

@phlogistonjohn

Copy link
Copy Markdown
Contributor

There's a helper method sorted_dependencies on the base class to automate that. But it really doesn't matter enough to ask for changes there.

@phlogistonjohn

Copy link
Copy Markdown
Contributor

Teuthology Run: https://pulpito-ng.ceph.com/runs/phlogistonjohn-2026-07-09_21:50:32-orch-wip-phlogistonjohn-testing-1-2026-07-09-1415-distro-default-trial
(6) failures out of 64 tests.
4 well-known flakes for ctdb_status
1 failure to connect to AD
1 failure to connect to share

Teuthology Re-run: https://pulpito-ng.ceph.com/runs/phlogistonjohn-2026-07-09_23:10:58-orch-wip-phlogistonjohn-testing-1-2026-07-09-1415-distro-default-trial
3 failures out of 6 re-run tests.
All repeat failures were the well-known flakes for ctdb_status

@phlogistonjohn

Copy link
Copy Markdown
Contributor

I'm holding off merging this until #69950 is ready because I want to merge them together.

@avanthakkar

Copy link
Copy Markdown
Contributor

jenkins test api

@anoopcs9 anoopcs9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's a helper method sorted_dependencies on the base class to automate that. But it really doesn't matter enough to ask for changes there.

@Sodani and if you happen to update this patch to address the other comment, you may consider using sorted_dependencies().

Comment thread src/pybind/mgr/cephadm/services/smb.py Resolved
@Sodani

Sodani commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@Sodani and if you happen to update this patch to address the other comment, you may consider using sorted_dependencies()

sorted_dependencies is defined in CephadmService class .. and to use that we need to import this class , that i feel not required, instead current implementation would suffice the job.
However i looked how other services are doing .. they are also directly calling sorted lib api.

@phlogistonjohn
phlogistonjohn merged commit 1049a49 into ceph:main Jul 10, 2026
6 checks passed
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.

4 participants