saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
13.98k stars 5.47k forks source link

[BUG] [3007] Salt-master doesn't start when ssl is enabled #66577

Open krajewp2 opened 1 month ago

krajewp2 commented 1 month ago

Description Salt-master doesn't start when ssl is enabled. I'm using default configuration file with lines 483-486 uncommented. I've tested multiple certificates, self signed ones and also generated using Lets Encrypt.

ssl:
    keyfile: /etc/salt/pki/wildcard.key
    certfile: /etc/salt/pki/wildcard.crt
    ssl_version: PROTOCOL_TLSv1_2

When starting service with such configuration I'm getting below error:

2024-05-22 15:06:30,405 [salt._logging.impl:1085][ERROR   ][177436] An un-handled exception was caught by Salt's global exception handler:
TypeError: PublishServer.__init__() got an unexpected keyword argument 'ssl'
Traceback (most recent call last):
  File "/usr/bin/salt-master", line 11, in <module>
    sys.exit(salt_master())
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/scripts.py", line 88, in salt_master
    master.start()
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/cli/daemons.py", line 224, in start
    self.master.start()
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 814, in start
    chan = salt.channel.server.PubServerChannel.factory(opts)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/channel/server.py", line 748, in factory
    transport = salt.transport.publish_server(opts, **kwargs)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/base.py", line 105, in publish_server
    return salt.transport.zeromq.PublishServer(opts, **kwargs)
TypeError: PublishServer.__init__() got an unexpected keyword argument 'ssl'

I've tested same configuration with salt 3006.8 and it just worked.

Setup New Centos 9 VM with salt-master 3007 installed (onedir installation) and SSL enabled.

Steps to Reproduce the behavior Basic Centos 9 Stream VM with salt-master 3007 installed.

Expected behavior salt-master should just work.

Versions Report

salt --versions-report ```yaml [root@salt-master-6 ~]# salt --versions-report Salt Version: Salt: 3007.0 Python Version: Python: 3.10.13 (main, Feb 19 2024, 03:31:20) [GCC 11.2.0] Dependency Versions: cffi: 1.16.0 cherrypy: unknown dateutil: 2.8.2 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 3.1.3 libgit2: Not Installed looseversion: 1.3.0 M2Crypto: Not Installed Mako: Not Installed msgpack: 1.0.7 msgpack-pure: Not Installed mysql-python: Not Installed packaging: 23.1 pycparser: 2.21 pycrypto: Not Installed pycryptodome: 3.19.1 pygit2: Not Installed python-gnupg: 0.5.2 PyYAML: 6.0.1 PyZMQ: 25.1.2 relenv: 0.15.1 smmap: Not Installed timelib: 0.3.0 Tornado: 6.3.3 ZMQ: 4.3.4 Salt Package Information: Package Type: onedir System Versions: dist: centos 9 locale: utf-8 machine: x86_64 release: 5.14.0-370.el9.x86_64 system: Linux version: CentOS Stream 9 ```
welcome[bot] commented 1 month ago

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

jlrcontegix commented 1 month ago

We upgraded to 3007.1 and had to comment out the configuration to get the masters to start and this is a problem for us, so we'll be rolling back.