Bug 841104 - fedora-review: fails to startup with "No mock group"
Summary: fedora-review: fails to startup with "No mock group"
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-review
Version: 17
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Stanislav Ochotnicky
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2012-07-18 07:40 UTC by Mikolaj Izdebski
Modified: 2012-08-18 01:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-08-18 01:27:17 UTC

Attachments (Terms of Use)

Description Mikolaj Izdebski 2012-07-18 07:40:13 UTC
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):

How reproducible:

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
  File "/usr/lib/python2.7/site-packages/FedoraReview/settings.py", line 188, in init
  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
$ grep mock /etc/group

Comment 1 Mikolaj Izdebski 2012-07-18 07:47:34 UTC
Reported upstream:

Comment 2 Mikolaj Izdebski 2012-07-25 05:29:32 UTC
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()

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 07:46:00 UTC
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 10:06:05 UTC
fedora-review-0.2.2-1.fc16 has been submitted as an update for Fedora 16.

Comment 5 Fedora Update System 2012-08-09 10:06:21 UTC
fedora-review-0.2.2-1.fc17 has been submitted as an update for Fedora 17.

Comment 6 Fedora Update System 2012-08-09 22:56:35 UTC
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:
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-08-18 01:27:17 UTC
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-18 01:30:25 UTC
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.