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 <[email protected]>
CC: aaron conole <[email protected]>
Fixes: ac416a3 ("redhat: dynamically allocate and reference ovs user")
Signed-off-by: Timothy Redaelli <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Aaron Conole <[email protected]>
Tested-by: Mark Michelson <[email protected]>
  • Loading branch information
drizzt authored and blp committed Nov 29, 2017
1 parent 01393f0 commit 951d79e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rhel/openvswitch-fedora.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 951d79e

Please sign in to comment.