Actions
Bug #9922
closedhaproxy_version does not use full path to haproxy, leads to errors when run during cron
Start date:
11/25/2019
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
Affected Version:
All
Affected Plus Version:
Affected Architecture:
All
Description
When /etc/rc.filter_configure_sync is run from cron, it yields errors from haproxy. For example in this simulated run:
: env PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin /etc/rc.filter_configure_sync sh: haproxy: not found sh: haproxy: not found sh: haproxy: not found sh: haproxy: not found
The culprit is haproxy_version()
which does not use the full path to haproxy:
$haproxy_version = shell_exec("haproxy -v | head -n 1 | awk '{ print $3 }'");
To me, I have a fix pending.
Updated by Jim Pingle over 4 years ago
- Status changed from New to Feedback
Updated by Azamat Khakimyanov over 2 years ago
- Status changed from Feedback to Resolved
Tested on 21.05.1 and on 22.01-DEVELOPMENT (built on Sun Oct 31 05:21:32 UTC 2021)
Both versions have full path '/usr/local/sbin/haproxy' in haproxy_version() function and there was no problem with running /etc/rc.filter_configure_sync in cron.
I marked this bug as resolved.
Actions