smb: fix custom ports feature with remote-control sidecar#65069
Merged
smb: fix custom ports feature with remote-control sidecar#65069
Conversation
Add a new smb sub package for smb related things that are meant to be shared throughout the Ceph python code related to smb and the smb management stack. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Update the SMBSpec class to use the new constants provided by the recently added python-common smb package. Signed-off-by: John Mulligan <jmulligan@redhat.com>
14 tasks
adk3798
approved these changes
Aug 15, 2025
adk3798
reviewed
Aug 15, 2025
| self.CTDB: ceph.smb.constants.CTDB, | ||
| self.REMOTE_CONTROL: ceph.smb.constants.REMOTE_CONTROL | ||
| } | ||
| return names[self] |
Contributor
There was a problem hiding this comment.
mypy complaint from make check (check-black was also failing)
cephadmlib/daemons/smb.py: note: In member "__str__" of class "Ports":
cephadmlib/daemons/smb.py:130: error: Invalid index type "Ports" for "dict[int, str]"; expected type "int" [index]
Found 1 error in 1 file (checked 49 source files)
mypy: exit 1 (13.13 seconds) /home/jenkins-build/build/workspace/ceph-pull-requests/src/cephadm> mypy --config-file ../mypy.ini cephadm.py cephadmlib pid=775889
mypy: FAIL ✖ in 33.01 seconds
Contributor
Author
There was a problem hiding this comment.
This was a weird one (see coment). But I worked around it.
anoopcs9
approved these changes
Aug 16, 2025
Contributor
anoopcs9
left a comment
There was a problem hiding this comment.
lgtm.
See below for minor nit.
Make behavior consistent across the smb mgr module and the service spec class by using the same set of constants. Fix an issue supporting the customization of the `remote-control` sidecar's port. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Use the new set of constants to ensure all components that touch the smb services use the same set of ports and port names. Ensure that the remote-control sidecar service's port can be customized. Signed-off-by: John Mulligan <jmulligan@redhat.com>
3c5e860 to
98d4853
Compare
Contributor
|
jenkins test make check |
1 similar comment
Contributor
|
jenkins test make check |
Contributor
|
jenkins test make check |
1 similar comment
Contributor
Author
|
jenkins test make check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a mistake in 09da84f when we added a new service/port for the remote-control and fixes a mistake in 4180cdd where the port name is based on lowercasing the enum name (as that value will have an underscore instead of dash as generated by the mgr).
Take the opportunity to use common constants for some of these smb related things by creating a new directory under python-common/ceph, specifically so these common things can be used by the mgr code, cephadm code, and/or other parts of python-common.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition