Hi all,

What I am reporting here, was tested on -stable and on -current. Below
details are from -stable, because I discovered it first there and have
the notes from that machine.

One of my OpenBSD 7.4 machines, because of package unrelated to salt,
had py3-setproctitle installed on that machine and that resuled in
following problem:

ks3# rcctl check salt_minion
salt_minion(failed)

It seems that pexp from /etc/rc.d/salt_minion doesn't match the process
when salt minion is started with py3-setproctitle package available.

Here are more details:

ks3# sysctl -n kern.version
OpenBSD 7.4 (GENERIC.MP) #0: Sun Oct 22 12:13:42 MDT 2023
    
r...@syspatch-74-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

ks3# cat /etc/installurl
https://cdn.openbsd.org/pub/OpenBSD/

ks3# pkg_info -qI salt
salt-3006.3

No py3-setproctitle installed:

ks3# ls -1 /var/db/pkg/ | grep -ci proc
0

ks3# pkg_add -a -i py3-setproctitle
quirks-6.160 signed on 2023-11-19T13:55:25Z
py3-setproctitle-1.3.2p1: ok

ks3# rcctl restart salt_minion
salt_minion(ok)
salt_minion(ok)

ks3# pgrep -lf salt
8102 python3.10: /usr/local/bin/python3.10 /usr/local/bin/salt-minion -d 
MainProcess

ks3# rcctl check salt_minion
salt_minion(failed)

If we wait for random_startup_delay:

ks3# grep -e ^random_startup_delay /etc/salt/minion
random_startup_delay: 180

then proc title changes again:

ks3# pgrep -lf salt
8102 python3.10: /usr/local/bin/python3.10 /usr/local/bin/salt-minion -d 
MultiMinionProcessManager MinionProcessManager

ks3# pkg_delete -c py3-setproctitle
py3-setproctitle-1.3.2p1: ok
Read shared items: ok

ks3# rcctl restart salt_minion
salt_minion(ok)

ks3# pgrep -lf salt
78929 /usr/local/bin/python3.10 /usr/local/bin/salt-minion -d
8102 python3.10: /usr/local/bin/python3.10 /usr/local/bin/salt-minion -d 
MultiMinionProcessManager MinionProcessManager

We see above orphaned previous instance of salt-minion which had
setproctitle loaded.

ks3# kill 8102
ks3# pgrep -lf salt
78929 /usr/local/bin/python3.10 /usr/local/bin/salt-minion -d

ks3# rcctl check salt_minion
salt_minion(ok)

-- 
Regards,
 Mikolaj

Reply via email to