HomeClusterLabs Projects

Fix: cibsecret: Use 'ps axww' to avoid truncating issue

Description

Fix: cibsecret: Use 'ps axww' to avoid truncating issue

When python program calling cibsecret with a small terminal width,
the command ps -ef | grep '[p]acemaker-controld' will return 1, see

cmd = "ps -ef | grep '[p]acemaker-controld' >/dev/null"

When terminal width is small

subprocess.call(cmd, shell=True)

1

When terminal is big enough

subprocess.call(cmd, shell=True)

0

Use 'ps axww' can avoid this issue, also for BSD environment.

Details

Provenance
xin liang <xliang@suse.com>Authored on Mar 6 2024, 4:07 AM
Parents
rP2cdec7080e14: Merge pull request #3357 from clumens/crm_ticket-fo
Branches
Unknown
Tags
Unknown

Event Timeline

xin liang <xliang@suse.com> committed rP581e1bf3850a: Fix: cibsecret: Use 'ps axww' to avoid truncating issue (authored by xin liang <xliang@suse.com>).Mar 6 2024, 10:27 AM