2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
Timothy Redaelli
113f925aa5 rhel: Use /run instead of /var/run.
Systemd unit file generates warnings about PID file path since /var/run
is a legacy path so just use /run instead of /var/run.

/var/run is a symlink of /run starting from RHEL7 (and any other distribution
that uses systemd).

Reported-at: https://bugzilla.redhat.com/1952081
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2021-11-08 22:45:49 +01:00
Markos Chandras
b096fa42dd rhel: Use correct user in the logrotate configuration file
The /var/log/openvswitch directory is owned by the openvswitch user but
logrotate could be running as root or as another user. As a result of
which, rpmlint prints the following warning when building the spec file
on SUSE Linux Enterprise:

openvswitch.x86_64: W: suse-logrotate-user-writable-log-dir /var/log/openvswitch openvswitch:openvswitch 0750
The log directory is writable by unprivileged users. Please fix the
permissions so only root can write there or add the 'su' option
to your logrotate config

In order to fix that, we should run the logrotate script as the same
user which runs the various Open vSwitch daemons. If this is a new
installation, then this user is the 'openvswitch' one, but if we are
upgrading from an older release, then the user is normally 'root'.
As such, we set the initial user to 'root' and we fix this up in the
%post scriptlet.

Cc: Aaron Conole <aconole@redhat.com>
Cc: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Markos Chandras <mchandras@suse.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Timothy Redaelli <tredaelli@redhat.com>
2018-08-08 10:58:05 -07:00
Numan Siddique
bbf219ef58 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>
2017-11-26 16:32:12 -08:00
Timothy Redaelli
618a5b45ae rhel: Avoid logrotate error if /var/run/openvswitch does not exist
Avoid also errors if an ovs server didn't start correctly or it crashed without
deleting the pid file.

Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1441524
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-04-13 10:09:32 -07:00
Timothy Redaelli
f848080e55 rhel/etc_logrotate.d_openvswitch: Fix coding style
Replace tabs by 4 spaces and indent the postrotate script like the
examples in 'man logrotate.conf'

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-04-13 10:07:37 -07:00
Gurucharan Shetty
43516d9339 rhel, xenserver: Make logrotate daily and compress old logs.
The default values can be different and usually comes from /etc/logrotate.conf.

For xenserver6.0.2, the values in /etc/logrotate.conf is daily and compress.
So this patch does not make any difference. But it does future proof against
any changes in xenserver in the future.

For rhel6.1, the values are weekly and un-compress.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-02-14 14:14:33 -08:00
Ben Pfaff
b54c9e972e Properly reopen python daemon log files after rotation.
The OVS Python daemons weren't reopening their log files after rotation, so
all the log information after the second rotation was lost.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-22 10:17:07 -07:00
Raju Subramanian
e0edde6fee Global replace of Nicira Networks.
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc.

Feature #10593
Signed-off-by: Raju Subramanian <rsubramanian@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02 17:08:02 -07:00
Ben Pfaff
c434706a37 Add RHEL 5/6 spec files and instructions. 2011-06-21 13:01:13 -07:00