[ovs-dev,3/3] RHEL: create /etc/openvswitch directory
diff mbox

Message ID 1443997210-9377-3-git-send-email-aatteka@nicira.com
State Accepted
Headers show

Commit Message

Ansis Atteka Oct. 4, 2015, 10:20 p.m. UTC
This directory needs to be created by the package manager
because ovs-ctl is being invoked from SElinux openvswitch
domain that does not have enough privileges to create
directories under /etc on its own.

Without this patch Open vSwitch is not able to start under
SElinux enforcing mode (which is default on CentOS by the way).

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
---
 rhel/openvswitch.spec.in | 1 +
 1 file changed, 1 insertion(+)

Comments

Kyle Mestery Oct. 5, 2015, 1:20 a.m. UTC | #1
On Sun, Oct 4, 2015 at 5:20 PM, Ansis Atteka <aatteka@nicira.com> wrote:

> This directory needs to be created by the package manager
> because ovs-ctl is being invoked from SElinux openvswitch
> domain that does not have enough privileges to create
> directories under /etc on its own.
>
> Without this patch Open vSwitch is not able to start under
> SElinux enforcing mode (which is default on CentOS by the way).
>
> Signed-off-by: Ansis Atteka <aatteka@nicira.com>
> ---
>  rhel/openvswitch.spec.in | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in
> index 0ec65be..4a2076c 100644
> --- a/rhel/openvswitch.spec.in
> +++ b/rhel/openvswitch.spec.in
> @@ -120,6 +120,7 @@ exit 0
>
>  %files
>  %defattr(-,root,root)
> +%dir /etc/openvswitch
>  /etc/bash_completion.d/ovs-appctl-bashcomp.bash
>  /etc/bash_completion.d/ovs-vsctl-bashcomp.bash
>  /etc/init.d/openvswitch
> --
> 2.1.4
>
>
Ackedy-by: Kyle Mestery <mestery@mestery.com>


> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
Flavio Leitner Oct. 6, 2015, 7:22 p.m. UTC | #2
On Sun, Oct 04, 2015 at 03:20:10PM -0700, Ansis Atteka wrote:
> This directory needs to be created by the package manager
> because ovs-ctl is being invoked from SElinux openvswitch
> domain that does not have enough privileges to create
> directories under /etc on its own.
> 
> Without this patch Open vSwitch is not able to start under
> SElinux enforcing mode (which is default on CentOS by the way).
> 
> Signed-off-by: Ansis Atteka <aatteka@nicira.com>
> ---

LGTM

Acked-by: Flavio Leitner <fbl@sysclose.org>

Patch
diff mbox

diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in
index 0ec65be..4a2076c 100644
--- a/rhel/openvswitch.spec.in
+++ b/rhel/openvswitch.spec.in
@@ -120,6 +120,7 @@  exit 0
 
 %files
 %defattr(-,root,root)
+%dir /etc/openvswitch
 /etc/bash_completion.d/ovs-appctl-bashcomp.bash
 /etc/bash_completion.d/ovs-vsctl-bashcomp.bash
 /etc/init.d/openvswitch