Skip to content

Commit

Permalink
rhel: Avoid creating an empty database file.
Browse files Browse the repository at this point in the history
In 59e8cb8 ("rhel: Move conf.db to /var/lib/openvswitch, using symlinks.")
conf.db is created as empty file in /var/lib/openvswitch, if it doesn't
exists, but this prevent ovsdb-server to start.

This commit changes the previous behaviour to set
/var/lib/openvswitch owner to openvswitch:hugetlbfs, if built with
dpdk, or openvswitch:openvswitch.

Fixes: 59e8cb8 ("rhel: Move conf.db to /var/lib/openvswitch, using symlinks.")
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2022-December/400045.html
Reported-by: Roi Dayan <[email protected]>
Signed-off-by: Timothy Redaelli <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
drizzt authored and igsilya committed Dec 20, 2022
1 parent 69e71bf commit 1ea0fa4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions rhel/openvswitch-fedora.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,6 @@ for base in conf.db .conf.db.~lock~; do
if test ! -e $old && test ! -h $old; then
ln -s $new $old
fi
touch $new
%if %{with dpdk}
chown openvswitch:hugetlbfs $new
%else
chown openvswitch:openvswitch $new
%endif
done

%if 0%{?systemd_post:1}
Expand Down Expand Up @@ -505,7 +499,11 @@ fi
%{_prefix}/lib/udev/rules.d/91-vfio.rules
%endif
%doc NOTICE README.rst NEWS rhel/README.RHEL.rst
/var/lib/openvswitch
%if %{with dpdk}
%attr(750,openvswitch,hugetlbfs) /var/lib/openvswitch
%else
%attr(750,openvswitch,openvswitch) /var/lib/openvswitch
%endif
%attr(750,root,root) /var/log/openvswitch
%ghost %attr(755,root,root) %{_rundir}/openvswitch
%ghost %attr(644,root,root) %{_rundir}/openvswitch.useropts
Expand Down

0 comments on commit 1ea0fa4

Please sign in to comment.