Bug 966751 - service openvswitch status operation requires root permissions
service openvswitch status operation requires root permissions
Status: CLOSED DUPLICATE of bug 1148497
Product: RDO
Classification: Community
Component: openvswitch (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Flavio Leitner
Ofer Blaut
Depends On:
  Show dependency treegraph
Reported: 2013-05-23 17:15 EDT by Steven Dake
Modified: 2016-04-26 18:56 EDT (History)
4 users (show)

See Also:
Fixed In Version: openvswitch-2.0.1-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-10-23 09:47:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steven Dake 2013-05-23 17:15:20 EDT
Description of problem:
The command "service openvswitch status" operation requires root permissions.  This operation should complete as a non-privileged user.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. be logged in as a non-root user
2. run service openvswitch status

Actual results:
[sdake@q1 utils]$ service openvswitch status
/usr/share/openvswitch/scripts/ovs-lib: line 49: /var/log/openvswitch/ovs-ctl.log: Permission denied
tee: /var/log/openvswitch/ovs-ctl.log: Permission denied
ovsdb-server is running with pid 1467
ovs-vswitchd is running with pid 1477
[sdake@q1 utils]$ echo $?

Expected results:
[sdake@q1 utils]$ service openvswitch status
ovsdb-server is running with pid 1467
ovs-vswitchd is running with pid 1477
[sdake@q1 utils]$ echo $?

Additional info:
openvswitch init script is able to determine that the ops-vswitchd and ovsdb-server processes are running, so there shouldn't be a need to run ovs-ctl.
Comment 1 Flavio Leitner 2014-02-26 21:24:17 EST
The problem is that openvswitch logs all initscripts operations (start/stop/restart/status/...) to the ovs-vsctl.log which has no write permission for non-root users.

Since the "status" operation doesn't affect the service at all, I don't see much value in logging it. Therefore, I am proposing a patch upstream to change that.

Comment 2 Flavio Leitner 2014-02-27 07:57:15 EST
Patch has been updated:
Comment 3 Flavio Leitner 2014-02-27 10:59:57 EST
Patch accepted upstream:

I will backport to our packages as the next step.
Comment 4 Flavio Leitner 2014-03-27 22:06:46 EDT
This is fixed in openvswitch-2.0.1-1.el6
Comment 5 Flavio Leitner 2014-10-23 09:47:38 EDT

*** This bug has been marked as a duplicate of bug 1148497 ***

Note You need to log in before you can comment on or make changes to this bug.