Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 853955

Summary: [ovirt-engine-dwh] There should be no exception shown to a user when running setup with non root user
Product: Red Hat Enterprise Virtualization Manager Reporter: Kiril Nesenko <knesenko>
Component: ovirt-engine-dwhAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED ERRATA QA Contact: Barak Dagan <bdagan>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 3.1.0CC: aberezin, acathrow, dfediuck, iheim, jkt, oschreib, pstehlik, Rhev-m-bugs, ylavi
Target Milestone: ---Keywords: Triaged
Target Release: 3.3.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: integration
Fixed In Version: rhevm-reports-3.3.0-13.el6ev.noarch.rpm Doc Type: Bug Fix
Doc Text:
Running rhevm-dwh-setup with a non-root user now exits with a notification message that the setup has to be executed by the root user.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 14:58:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kiril Nesenko 2012-09-03 12:10:17 UTC
Description of problem:
There should be no exception shown to a user when running setup with non root user

ERROR:root:Traceback (most recent call last):
  File "/usr/share/ovirt-engine-dwh/common_utils.py", line 92, in initLogging
    hdlr = logging.FileHandler(filename = log_file, mode='w')
  File "/usr/lib64/python2.7/logging/__init__.py", line 897, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib64/python2.7/logging/__init__.py", line 916, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/var/log/ovirt-engine/ovirt-engine-dwh-setup-2012_09_02_14_42_49.log'

Traceback (most recent call last):
  File "/bin/ovirt-engine-dwh-setup", line 40, in <module>
    log_file = utils.initLogging("%s-setup" % DWH_PACKAGE_NAME, "/var/log/ovirt-engine")
  File "/usr/share/ovirt-engine-dwh/common_utils.py", line 102, in initLogging
    raise Exception()
Exception



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


How reproducible:


Steps to Reproduce:
1. Try to run a setup with non root user.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Arthur Berezin 2013-10-16 15:42:06 UTC
So what's the proposed behaviour when running with a non root user?

Comment 4 Barak Dagan 2013-11-08 14:12:43 UTC
Verified in IS21:

$ rpm -q rhevm
rhevm-3.3.0-0.31.beta1.el6ev.noarch

$ rpm -qa | egrep 'dwh|reports'
rhevm-dwh-3.3.0-18.el6ev.noarch
jasperreports-server-pro-5.5.0-4.el6ev.noarch
rhevm-reports-3.3.0-18.el6ev.noarch


[root@myhost ~]# su baaa
[baaa@myhost root]$ rhevm-dwh-setup 
Error: insufficient permissions for user baaa, you must run with user root.

Comment 5 Charlie 2013-11-28 00:54:18 UTC
This bug is currently attached to errata RHEA-2013:15116. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to 
minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.

Comment 8 errata-xmlrpc 2014-01-21 14:58:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0036.html