Message ID | d7f650c4973284b713ce22c08d2b93468c835996.1671204586.git.tredaelli@redhat.com |
---|---|
State | Accepted |
Commit | 1ea0fa4ad7dc2dbfdb1f221eff97efbf3e1af894 |
Headers | show |
Series | [ovs-dev] rhel: avoid creating an empty database file | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/intel-ovs-compilation | success | test: success |
On 12/16/22 16:29, Timothy Redaelli wrote: > 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> > --- > rhel/openvswitch-fedora.spec.in | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > > diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in > index 8d692b36c..6c8813793 100644 > --- a/rhel/openvswitch-fedora.spec.in > +++ b/rhel/openvswitch-fedora.spec.in > @@ -340,12 +340,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} > @@ -506,7 +500,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 Thanks, Timothy. This change seems to work. Roi, could you, please, check if it solves the problem in your setup? Best regards, Ilya Maximets.
On 12/19/22 13:23, Ilya Maximets wrote: > On 12/16/22 16:29, Timothy Redaelli wrote: >> 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> >> --- >> rhel/openvswitch-fedora.spec.in | 12 +++++------- >> 1 file changed, 5 insertions(+), 7 deletions(-) >> >> diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in >> index 8d692b36c..6c8813793 100644 >> --- a/rhel/openvswitch-fedora.spec.in >> +++ b/rhel/openvswitch-fedora.spec.in >> @@ -340,12 +340,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} >> @@ -506,7 +500,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 > > Thanks, Timothy. This change seems to work. > > Roi, could you, please, check if it solves the problem in your setup? Meanwhile, I applied this patch as it is definitely an improvement. Thanks! > > Best regards, Ilya Maximets.
On 20/12/2022 17:25, Ilya Maximets wrote: > On 12/19/22 13:23, Ilya Maximets wrote: >> On 12/16/22 16:29, Timothy Redaelli wrote: >>> 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.openvswitch.org%2Fpipermail%2Fovs-dev%2F2022-December%2F400045.html&data=05%7C01%7Croid%40nvidia.com%7Ca0140713b6694e16d42808dae29e5cb1%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638071467040066931%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=WLZmwRJz4VGbsopRJDxi6RZv07mRpvAWCjL6H03BoMM%3D&reserved=0 >>> Reported-by: Roi Dayan <roid@nvidia.com> >>> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> >>> --- >>> rhel/openvswitch-fedora.spec.in | 12 +++++------- >>> 1 file changed, 5 insertions(+), 7 deletions(-) >>> >>> diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in >>> index 8d692b36c..6c8813793 100644 >>> --- a/rhel/openvswitch-fedora.spec.in >>> +++ b/rhel/openvswitch-fedora.spec.in >>> @@ -340,12 +340,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} >>> @@ -506,7 +500,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 >> >> Thanks, Timothy. This change seems to work. >> >> Roi, could you, please, check if it solves the problem in your setup? > > Meanwhile, I applied this patch as it is definitely an improvement. > Thanks! > >> >> Best regards, Ilya Maximets. > hi thanks for the update. I'll check this and update if i'll hit an issue.
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 8d692b36c..6c8813793 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -340,12 +340,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} @@ -506,7 +500,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
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> --- rhel/openvswitch-fedora.spec.in | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)