[ovs-dev] [PATCH] redhat: Create /etc/openvswitch/* with openvswitch as user/group

Mark Michelson mmichels at redhat.com
Wed Nov 29 16:53:20 UTC 2017


On Wed, Nov 29, 2017 at 10:47 AM Timothy Redaelli <tredaelli at redhat.com>
wrote:

> Without this commit is not possible to upgrade an openvswitch release
> that includes the commit ac416a3ab2d2 (for example 2.8.0) with another
> release
> that includes the commit ac416a3ab2d2 (for example master or 2.8.1),
> because
> rpm changes the user/group of /etc/openvswitch to root/root, but
> ovsdb-server
> starts with the user openvswitch and so it doesn't have permissions to
> write in
> /etc/openvswitch/conf.db.
>
> This patch tell rpm to use the openvswitch user and group for
> /etc/openvswitch and /etc/openvswitch/default.conf.
>
> Reported-by: Mark Michelson <mmichels at redhat.com>
> CC: aaron conole <aconole at redhat.com>
> Fixes: ac416a3ab2d2 ("redhat: dynamically allocate and reference ovs user")
> Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
>

Tested-by: Mark Michelson <mmichels at redhat.com>


> ---
>  rhel/openvswitch-fedora.spec.in | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/
> openvswitch-fedora.spec.in
> index e600a943c..ed991cf07 100644
> --- a/rhel/openvswitch-fedora.spec.in
> +++ b/rhel/openvswitch-fedora.spec.in
> @@ -519,15 +519,16 @@ fi
>  %{_includedir}/ovn/*
>
>  %files
> -%defattr(-,root,root)
> -%{_sysconfdir}/bash_completion.d/ovs-appctl-bashcomp.bash
> -%{_sysconfdir}/bash_completion.d/ovs-vsctl-bashcomp.bash
> +%defattr(-,openvswitch,openvswitch)
>  %dir %{_sysconfdir}/openvswitch
>  %{_sysconfdir}/openvswitch/default.conf
>  %config %ghost %{_sysconfdir}/openvswitch/conf.db
>  %ghost %{_sysconfdir}/openvswitch/.conf.db.~lock~
>  %config %ghost %{_sysconfdir}/openvswitch/system-id.conf
>  %config(noreplace) %{_sysconfdir}/sysconfig/openvswitch
> +%defattr(-,root,root)
> +%{_sysconfdir}/bash_completion.d/ovs-appctl-bashcomp.bash
> +%{_sysconfdir}/bash_completion.d/ovs-vsctl-bashcomp.bash
>  %config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch
>  %{_unitdir}/openvswitch.service
>  %{_unitdir}/ovsdb-server.service
> --
> 2.14.3
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list