ce4c8c4921
When py-processtitle is installed, the master and minion daemons will change their process titles in a way that breaks commands like "service salt_minion status". status, stop, restart, etc are all broken. Fix this bug by: * Always installing py-processtitle unconditionally, * Fixing utils/process.py to not insert an extra space in the title * Adjusting the RC scripts accordingly A downside is that many service subcommands will now print this harmless warning message: ``` /usr/local/etc/rc.d/salt_minion: WARNING: cannot read shebang line from MultiMinionProcessManager ``` Approved by: krion (maintainer) Sponsored by: ConnectWise PR: 285053
15 lines
547 B
Python
15 lines
547 B
Python
--- salt/utils/process.py.orig 2024-07-29 07:51:58 UTC
|
|
+++ salt/utils/process.py
|
|
@@ -59,7 +59,10 @@ def appendproctitle(name):
|
|
current = setproctitle.getproctitle()
|
|
if current.strip().endswith("MainProcess"):
|
|
current, _ = current.rsplit("MainProcess", 1)
|
|
- setproctitle.setproctitle(f"{current.rstrip()} {name}")
|
|
+ if len(current) > 0:
|
|
+ setproctitle.setproctitle(f"{current.rstrip()} {name}")
|
|
+ else:
|
|
+ setproctitle.setproctitle(name)
|
|
|
|
|
|
def daemonize(redirect_out=True):
|