Bug 1174286

Summary: mock's --new-chroot invalid machine name
Product: [Fedora] Fedora Reporter: Mikhail Campos <Mikhail_Campos-Guadamuz>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: jdisnard, mebrown, msimacek, msuchy, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: mock-1.2.6-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-21 23:08:57 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:
Attachments:
Description Flags
Unique name for each container, when --new-chroot used none

Description Mikhail Campos 2014-12-15 14:57:11 UTC
Created attachment 969061 [details]
Unique name for each container, when --new-chroot used

Description of problem:
If we try to build some rpms at the same time for the different targets with systemd-nspawn we can result in error. This is because -M option is not used and all machine names for systemd-nspawn have the same name 'root' (the last component of the root directory of the container), so container with the existing name can't be registered.

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

Example:
1. 1st terminal: sudo systemd-nspawn -D /var/lib/mock/fedora-21-x86_64/root 
2. 2nd terminal: mock -r fedora-21-x86_64 ~/zlib-1.2.8-7.fc21.src.rpm --new-chroot

Actual results:
...
[output ommitted]
ERROR: Exception(/home/plageat/zlib-1.2.8-7.fc21.src.rpm) Config(fedora-21-x86_64) 0 minutes 0 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-21-x86_64/result
ERROR: Command failed. See logs for output.
 # /usr/bin/systemd-nspawn -D /var/lib/mock/fedora-21-x86_64/root /usr/sbin/groupadd -g 135 mockbuild

Expected results:
No errors

Proposed patch attached.

Comment 1 Miroslav Suchý 2015-01-08 13:17:53 UTC
Committed as:
* f87fc84 Fixed systemd-nspawn machine name collision [RHBZ#1174286]

Thanks for contributing.

Comment 2 Fedora Update System 2015-01-16 09:56:36 UTC
mock-1.2.4-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.4-1.fc21

Comment 3 Fedora Update System 2015-01-16 09:57:14 UTC
mock-1.2.4-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.4-1.fc20

Comment 4 Fedora Update System 2015-01-16 10:00:59 UTC
mock-1.2.4-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.4-1.el7

Comment 5 Fedora Update System 2015-01-16 10:01:37 UTC
mock-1.2.4-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.4-1.el6

Comment 6 Fedora Update System 2015-01-16 19:10:16 UTC
Package mock-1.2.4-1.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.2.4-1.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-0312/mock-1.2.4-1.el7
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2015-01-21 23:08:57 UTC
mock-1.2.4-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2015-01-27 03:04:27 UTC
mock-1.2.4-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2015-01-28 15:20:08 UTC
mock-1.2.5-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.5-1.el7

Comment 10 Fedora Update System 2015-01-28 15:21:28 UTC
mock-1.2.5-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.5-1.el6

Comment 11 Fedora Update System 2015-01-28 15:22:36 UTC
mock-1.2.5-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.5-1.fc20

Comment 12 Fedora Update System 2015-01-28 15:23:49 UTC
mock-1.2.5-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.5-1.fc21

Comment 13 Fedora Update System 2015-02-02 17:22:21 UTC
mock-1.2.5-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2015-02-03 04:42:27 UTC
mock-1.2.6-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.el6

Comment 15 Fedora Update System 2015-02-03 04:43:04 UTC
mock-1.2.6-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.el7

Comment 16 Fedora Update System 2015-02-03 04:43:25 UTC
mock-1.2.6-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc20

Comment 17 Fedora Update System 2015-02-03 04:44:02 UTC
mock-1.2.6-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc21

Comment 18 Fedora Update System 2015-02-09 05:29:16 UTC
mock-1.2.6-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2015-02-15 02:55:30 UTC
mock-1.2.6-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2015-02-20 00:32:55 UTC
mock-1.2.6-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2015-02-20 00:33:46 UTC
mock-1.2.6-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.