Bug 841104 - fedora-review: fails to startup with "No mock group"
fedora-review: fails to startup with "No mock group"
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: fedora-review (Show other bugs)
17
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Stanislav Ochotnicky
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-18 03:40 EDT by Mikolaj Izdebski
Modified: 2012-08-17 21:30 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-17 21:27:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mikolaj Izdebski 2012-07-18 03:40:13 EDT
Description of problem:
fedora-review fails to startup with "No mock group - mock not installed?"
error. Setting severity to high as the package is unusable (unless -p is given).

Version-Release number of selected component (if applicable):
0.2.0-1.fc17

How reproducible:
Always.

Steps to Reproduce:
1. fedora-review -v -b 1

Actual results:
$ fedora-review -v -b 1
Exception down the road...
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 115, in run
    Settings.init()
  File "/usr/lib/python2.7/site-packages/FedoraReview/settings.py", line 188, in init
    _check_mock_grp()
  File "/usr/lib/python2.7/site-packages/FedoraReview/settings.py", line 105, in _check_mock_grp
    raise ConfigError('No mock group - mock not installed?')
ConfigError: 'Configuration error: No mock group - mock not installed?'
Exception down the road...

Expected results:
fedora-review can find the mock group.

Additional info:
mock is installed and mock group exists. Also the user fedora-review
was ran as was a member of the mock group.
$ rpm -q mock
mock-1.1.22-2.1.fc17.noarch
$ grep mock /etc/group
mock:x:996:kojan
Comment 1 Mikolaj Izdebski 2012-07-18 03:47:34 EDT
Reported upstream:
https://fedorahosted.org/FedoraReview/ticket/78
Comment 2 Mikolaj Izdebski 2012-07-25 01:29:32 EDT
I don't know Python, but I tried debugging this a bit.
For me this seems to be the cause of the problem:

$ python
Python 2.7.3 (default, Apr 30 2012, 21:18:11) 
[GCC 4.7.0 20120416 (Red Hat 4.7.0-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getgroups()
[1000]

mock GID is 996 and it's not on the list returned by os.getgroups().

Full steps to reproduce:
 1) install a minimal F17
 2) # yum install fedora-review
 3) # useradd foo
 4) # usermod -a -G mock foo
 5) # su foo
 6) $ fedora-review -v -b 1
Comment 3 Mikolaj Izdebski 2012-07-25 03:46:00 EDT
It turns out that the user as which fedora-review is ran must be logged to the mock group. This can be done by running "newgrp mock". The manpage states that this command should be ran as root, while it needs to be ran as the user who will be running fedora review.

The manpage should be corrected, and also the error message should be made more user-friendly (something like "Please log into mock group" instead of "No mock group").

Also note that mock itself doesn't require logging to the mock group, so I think that fedora-review shouldn't require that either.
Comment 4 Fedora Update System 2012-08-09 06:06:05 EDT
fedora-review-0.2.2-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/fedora-review-0.2.2-1.fc16
Comment 5 Fedora Update System 2012-08-09 06:06:21 EDT
fedora-review-0.2.2-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/fedora-review-0.2.2-1.fc17
Comment 6 Fedora Update System 2012-08-09 18:56:35 EDT
Package fedora-review-0.2.2-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fedora-review-0.2.2-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-11573/fedora-review-0.2.2-1.fc16
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2012-08-17 21:27:17 EDT
fedora-review-0.2.2-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2012-08-17 21:30:25 EDT
fedora-review-0.2.2-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

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