Skip to content

Commit

Permalink
rhel: fix logrotate user config option
Browse files Browse the repository at this point in the history
If rpm is built with libcapng (default), /etc/logrotate.d/ovn
config file user is SEDed in postinstall section with 'ovn ovn'.

If one run logrotate, next error occurs:
```
[root@host ~]# logrotate /etc/logrotate.d/ovn
error: /etc/logrotate.d/ovn:9 unknown user 'ovn'
error: found error in /var/log/ovn/*.log , skipping
```

Replace 'ovn' user with 'openvswitch' to fix the issue.

Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
Acked-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
(cherry picked from commit e8800dd)
  • Loading branch information
odivlad authored and numansiddique committed Mar 24, 2022
1 parent 622d15d commit 135310c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rhel/ovn-fedora.spec.in
Expand Up @@ -323,7 +323,7 @@ ln -sf ovn_detrace.py %{_bindir}/ovn-detrace
%if %{with libcapng}
if [ $1 -eq 1 ]; then
sed -i 's:^#OVN_USER_ID=:OVN_USER_ID=:' %{_sysconfdir}/sysconfig/ovn
sed -i 's:\(.*su\).*:\1 ovn ovn:' %{_sysconfdir}/logrotate.d/ovn
sed -i 's:\(.*su\).*:\1 openvswitch openvswitch:' %{_sysconfdir}/logrotate.d/ovn
fi
%endif

Expand Down

0 comments on commit 135310c

Please sign in to comment.