Skip to content

Commit

Permalink
redhat: Create /etc/openvswitch/* with openvswitch as user/group
Browse files Browse the repository at this point in the history
Without this commit is not possible to upgrade an openvswitch release
that includes the commit ac416a3 (for example 2.8.0) with another release
that includes the commit ac416a3 (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@redhat.com>
CC: aaron conole <aconole@redhat.com>
Fixes: ac416a3 ("redhat: dynamically allocate and reference ovs user")
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
Tested-by: Mark Michelson <mmichels@redhat.com>
  • Loading branch information
drizzt authored and blp committed Nov 29, 2017
1 parent 3b0ae3e commit 949b4f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rhel/openvswitch-fedora.spec.in
Expand Up @@ -515,15 +515,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
Expand Down

0 comments on commit 949b4f1

Please sign in to comment.