Description of problem:We used systemctl kill ... to deliver SIGUSR1 to smart_proxy_dynflow_core to make it reopen its logs. While systemctl kill delivered the signal reliably, it delivered the signal to every process in the service's control group. The issue was when the service forked more processes (when running ansible-playbook). pkill signals only the processes with matching name.

Ansible-playbook reacts to SIGUSR{1,2} by printing "User defined signal1" and exiting, which is undesired.

Version-Release number of selected component (if applicable):6.4

How reproducible:Always

Steps to Reproduce:1. Run sleep 1000 using the ansible command template2. When the job runs, run logrotate -f /etc/logrotate.conf -v3. (optional) Watch the logrotate output as it may not rotate the logs if they were rotated recently

Associated revisions

The solution with using pkill was not ideal as pkillwould match the process it was meant to kill and theshell running pkill as well. This could lead toa situation where the shell would be killed firstand the signal would not be delivered to the intendedtarget process.

The solution with using pkill was not ideal as pkillwould match the process it was meant to kill and theshell running pkill as well. This could lead toa situation where the shell would be killed firstand the signal would not be delivered to the intendedtarget process.