When devel/py-setproctitle is installed as a dependency of another software, it will cause salt minion to adjust its process title from (python3.8 case) 2539 0 /usr/local/bin/python3.8 /usr/local/bin/salt-minion -c /usr/local/etc/salt -d to 8656 0 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-minion -c /usr/local/etc/salt -d KeepAlive MultiMinionProcessManager MinionProcessManager (python3.8) the rc.d script, using "command_interpreter", cannot assert the running state of the minion and when used together in a combination with a process pacemaker (puppet, monit etc) will cause numerous copies of the minion running. Using "procname" instead of "command_interpreter" in the rc.d script fixes this.
@Reporter Could you include the relevent files contents (as attachments) before and after installing setproctitle that shows the changes in invocation lines. Also, I can't see setproctitle as an unconditional or OPTION'al dependency for the salt port. How/where/when is setproctitle being introduced? Can you provide minimal steps to reproduce
Created attachment 226058 [details] change use of command_interpreter in procname for rc.d files This is a proposed patch to let the rc.d files for the sysutils/py-salt port to continue to work when devel/py-setproctitle is present on the system. the one for files/salt_proxy.in is subject to debate though as it clashes with the style of using procname to start a script. having both command_interpreter and procname doesn't work.
(In reply to Kubilay Kocak from comment #1) I see two things, I happen to have netbox installed on the same system as the salt minion, and net-mgmt/netbox installs devel/py-setproctitle as a indirect dependency through www/py-gunicorn. I also see setproctitle as a dependency in salt's requirement files themselves, but is apparently happy to work without it: $ grep -rl setproctitle work-py38/salt-3003.1/requirements/ | grep freebsd work-py38/salt-3003.1/requirements/static/pkg/py3.6/freebsd.txt work-py38/salt-3003.1/requirements/static/pkg/py3.8/freebsd.txt work-py38/salt-3003.1/requirements/static/pkg/py3.5/freebsd.txt work-py38/salt-3003.1/requirements/static/pkg/py3.7/freebsd.txt work-py38/salt-3003.1/requirements/static/pkg/py3.9/freebsd.txt work-py38/salt-3003.1/requirements/static/ci/py3.6/freebsd.txt work-py38/salt-3003.1/requirements/static/ci/py3.8/freebsd.txt work-py38/salt-3003.1/requirements/static/ci/py3.5/freebsd.txt work-py38/salt-3003.1/requirements/static/ci/py3.7/freebsd.txt work-py38/salt-3003.1/requirements/static/ci/py3.9/freebsd.txt so it could be added as a run dependency too
Ah this one still needs to have feedback. $ sudo pgrep -fl salt- 28354 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d 28357 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d 28902 /usr/local/bin/python3.8 /usr/local/bin/salt-minion -c /usr/local/etc/salt -d 28358 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d 28359 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d 28360 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d 28361 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d 28362 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d 28363 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d 28364 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d28366 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d 28367 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d 40979 /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d Using command_interpreter works $ sudo pkg install py38-setproctitle … $ sudo service salt_minion restart $ sudo service salt_master restart $ sudo pgrep -fl salt- 25572 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-minion -c /usr/local/etc/salt -d KeepAlive MultiMinionProcessManager MinionProcessManager 25900 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d ProcessManager 25906 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d ZeroMQPubServerChannel 25907 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d EventPublisher 25908 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d Maintenance 25909 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d ReqServer_ProcessManager 25910 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d MWorkerQueue 25911 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d MWorker-0 25912 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d MWorker-1 25913 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d MWorker-2 25914 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d MWorker-3 25916 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d MWorker-4 25917 python3.8: /usr/local/bin/python3.8 /usr/local/bin/salt-master -c /usr/local/etc/salt -d FileserverUpdate Using command_interpreter no longer works as the proctitle has changed $ sudo service salt_master status salt_master is not running. change command_intepreter to procname makes the rc.d logic works again. $ sudo service salt_master status salt_master is running as pid 25900. As python setproctitle is in salt’s requirements mentioned earlier, I’m adding a revised patch to make it a dependency
Created attachment 231577 [details] Make py-setproctitle a dependency and adjust rc.d files for salt
I need to redo this patch, as there are side effects when multiple salt components are running together. The proposed technique no longer can see the difference between minion, master, and api
Created attachment 240177 [details] No patch, just to obsolete the current patch
This is a duplicate of 285053. Or rather, that bug is a duplicate of this one. But that one is the one that got fixed, so I'm closing this one. *** This bug has been marked as a duplicate of bug 285053 ***