diff options
author | Numan Siddique <nusiddiq@redhat.com> | 2017-11-08 14:29:07 +0530 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-11-26 16:32:12 -0800 |
commit | bbf219ef584a102fde5150defab3a769a6a44981 (patch) | |
tree | ed367ff8a696153844caf1e9569bf9d64b4ff9d1 /rhel/etc_logrotate.d_openvswitch | |
parent | 8c8a8209ffad675dd50cfd64716ef579f57d1ae8 (diff) | |
download | openvswitch-bbf219ef584a102fde5150defab3a769a6a44981.tar.gz |
OpenvSwitch logrotate: Use ctl file path as target in ovs-appctl to reset logs
Presently, logrotate script, searches for the pid files in /var/log/openvswitch
and passes the pid file name (without .pid) as target to ovs-appctl. This approach
doesn't work for OVN DB servers since the ctl files are generated as "ovnnb_db.ctl"
and "ovnsb_db.ctl". So search for the .ctl files instead and use them as target to
ovs-appctl.
Suggested-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
Diffstat (limited to 'rhel/etc_logrotate.d_openvswitch')
-rw-r--r-- | rhel/etc_logrotate.d_openvswitch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rhel/etc_logrotate.d_openvswitch b/rhel/etc_logrotate.d_openvswitch index d93a56e51..ed7d733c9 100644 --- a/rhel/etc_logrotate.d_openvswitch +++ b/rhel/etc_logrotate.d_openvswitch @@ -13,8 +13,8 @@ postrotate # Tell Open vSwitch daemons to reopen their log files if [ -d /var/run/openvswitch ]; then - for pidfile in `cd /var/run/openvswitch && echo *.pid`; do - ovs-appctl -t "${pidfile%%.pid}" vlog/reopen 2>/dev/null || : + for ctl in /var/run/openvswitch/*.ctl; do + ovs-appctl -t "$ctl" vlog/reopen 2>/dev/null || : done fi endscript |