diff options
author | Timothy Redaelli <tredaelli@redhat.com> | 2022-12-16 16:29:46 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-12-20 12:59:00 +0100 |
commit | 1ea0fa4ad7dc2dbfdb1f221eff97efbf3e1af894 (patch) | |
tree | de9349dbe168efe1129373e9e6071a2ed88f1ff8 /rhel | |
parent | 69e71bf791c89690e38afe3b7012066e5d64a129 (diff) | |
download | openvswitch-1ea0fa4ad7dc2dbfdb1f221eff97efbf3e1af894.tar.gz |
rhel: Avoid creating an empty database file.
In 59e8cb8a053d ("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: 59e8cb8a053d ("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 <roid@nvidia.com>
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'rhel')
-rw-r--r-- | rhel/openvswitch-fedora.spec.in | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 4a3e6294b..17aab796f 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -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} @@ -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 |