Conversation
fdfd564 to
2857f60
Compare
Add logic to help customize the smb, smbmetrics, and/or ctdb port. In non-clustered mode the container runtime takes care of port mapping to the host and only needs to update smb and smbmetrics. In clustered mode the container runtime doesn't handle port mapping and the ports the real daemons bind to matter. smbmetrics already supports easy port configuration on the command line. smbd can be configured to bind to a different port via the conf so that will be later handled by the mgr module. ctdb needs a special option in sambacc so alter the /etc/services file! Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add a new dictionary field `custom_ports` to the SMB service spec. This field takes service names like `smb` or `ctdb` as string keys and maps them to custom ports. If a key is not present in the dict the default port for that "service" will be used. Signed-off-by: John Mulligan <jmulligan@redhat.com>
When smb is using custom ports the metrics port may not be the default. Teach the service_discovery.py module about smb custom ports and update a test to match. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Remove the hard coded default smbmetrics port, to help break any legacy code that might be trying to use it. Ensure that all customized port values get passed down to the cephadm binary. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add a function that will be used to validate the smb cluster's custom port values (when provided). Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
When a custom_ports field on the Cluster type is provided pass it to the smb service spec and smb/sambacc configuration fields needed. Signed-off-by: John Mulligan <jmulligan@redhat.com>
Clustered instances use host networking (for reasons) and nothing benefits from having --publish options in the container cli doing nothing and possibly being misleading (as there could be way more ports bound than the container runtime shows). Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add a teuthology test that exercises basic colocation of two smb clusters on the same ceph cluster by giving the 2nd cluster a distinct set of ports. Signed-off-by: John Mulligan <jmulligan@redhat.com>
eaa6957 to
e6b5940
Compare
|
After a few fixes in the deploy_smb_mgr_ctdb_res_ports2c.yaml file the new teuthology tests are passing for me. Marking as Ready for review. |
|
jenkins test make check |
Add a logger to service_discovery.py because a "typical" logger was not present and use the logger to capture the hopefully rare condition that service spec was not present for a daemon. Signed-off-by: John Mulligan <jmulligan@redhat.com>
|
A run of the smb sub-suite. Relevant tests passed. One failure that seems unrelated to any test specific thing (host failed to come up after kernel upgrade). This build was based on the commit immediately before the patch adding logging. |
|
jenkins test make check arm64 |
|
@adk3798 please review and/or queue for regression testing in teuthology when you have a moment |
anoopcs9
left a comment
There was a problem hiding this comment.
In a non-clustered configuration, with smbd listening on 445 and 139 by default, we publish only 445 to the host. Whereas in clustered configuration, with host networking, both 445 and 139 are exposed. Introduction of custom ports does not alter the current behaviour but can ONLY accept a single port, although smb ports smb.conf parameter is capable of accepting more than one port.
I am not asking to make a change here to accept more than one port for 'smb' within custom_ports but rather food for thought.
|
@anoopcs9 thanks for pointing that out. I'd prefer to just not listen on 139 at all. AFAIK it's completely unnecessary for recent clients. Any technical objections to that? |
|
Does the macOS client count as "recent"? |
I'm completely OK with that. May be I can look into extending the proposed change to accept only one to multiple ports for smb once we are done with the whole colocation work. |
Cool.
I haven't verified this on a real system, but we would just need to specify |
I'd be shocked to find out that the supported versions of Mac OS (13-15 according to wikipedia) require port 139. Clients are permitted to try 139 and 445 but port 139 has been legacy for a very long time. If you want to try and verify that it works with only 445 you can deploy a main or tentacle branch cluster without CTDB clustering. The existing container based networking only exposes 445 ... if you can connect to a share in that cluster from a mac we would know that it only needs 445. But I'm confident enough to not really need proof :-) |
I think I know where you are going. Are you considering to remove the Also the very first commit |
I haven't exactly written the code, but it sounds OK.
But I'm not sure where you're going with this. We need to use
OK, fair point. I will change it if I need to make any other substantial changes to this branch. Otherwise I don't think its misleading enough to be worth re-running make check and all the other heavy ceph tests over. |
|
jenkins test make check arm64 |
Yes, we must publish whatever is the listening port inside the container. My thought was in the direction to replace |
The above suggestion was agreed (offline) to be taken in as a separate PR. |
|
jenkins test make check arm64 |
|
@adk3798 ping. Please review and/or queue for testing and/or merge when you have a moment |
|
jenkins test make check arm64 |
Add support for custom ports to the smb cluster resources and smb service spec.
Custom ports are meant to accomplish two things:
Updated docs have more detail, but in short a cluster can now be configured with a new optional
custom_portsfield like so:If a "service name" key is not given in custom_ports, and the feature is used, it will automatically revert to using the default port.
Previously, Windows systems did not have a good way to connect to SMB servers listtening on a port other than 445. However with recent versions of Windows using an alternative port is supported. https://github.com/MicrosoftDocs/windowsserverdocs/blob/main/WindowsServerDocs/storage/file-server/smb-ports.md
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