Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 890695
Summary: | Mock fails with "ERROR: Namespace unshare failed." | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Steven Roberts <strobert> | ||||
Component: | mock | Assignee: | Clark Williams <williams> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | erik-fedora, mebrown, rmarko, williams | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-03-04 22:43:38 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
Steven Roberts
2012-12-28 20:11:17 UTC
Following change is required to run mock in OpenVZ: sed -i 's/|mockbuild.util.CLONE_NEWUTS//g' /usr/sbin/mock As it doesn't seem to be critical this flag can probably be moved to extended_unshare_flags. thank you very much. that worked great as a workaround. Been a while sicne I used actual sed, was before GNU added the -i flag. was actually one of the big pushes for me to move to perl years ago for my admin editing (perl's -i flag) FYI, If I move the flag to the extended_unshare_flags, it works as well. a diff for that change: --- /tmp/mock 2013-01-17 09:52:07.000000000 -0800 +++ /usr/sbin/mock 2013-01-17 11:47:59.000000000 -0800 @@ -760,8 +760,8 @@ os.environ["HOME"] = chroot.homedir # New namespace starting from here - base_unshare_flags = mockbuild.util.CLONE_NEWNS|mockbuild.util.CLONE_NEWUTS - extended_unshare_flags = base_unshare_flags|mockbuild.util.CLONE_NEWPID|mockbuild.util.CLONE_NEWIPC + base_unshare_flags = mockbuild.util.CLONE_NEWNS + extended_unshare_flags = base_unshare_flags|mockbuild.util.CLONE_NEWPID|mockbuild.util.CLONE_NEWIPC|mockbuild.util.CLONE_NEWUTS try: mockbuild.util.unshare(extended_unshare_flags) except mockbuild.exception.UnshareFailed, e: what kernel were you running on that failed with CLONE_NEWUTS? 2.6.32-042stab065.3 (openvz) Well that's odd. CLONE_NEWUTS was added back in 2006, three years before 2.6.32 was released. Does your kernel not have CONFIG_UTS_NS turned on? I can move CLONE_NEWUTS to the extended flags but it seems odd that your kernel doesn't have it turned on. OpenVZ: 2.6.32-042stab068.8 From reading the docs on CLONE_NEWUTS, it sounds like it is what a container itself would use and since I am already running mock inside of an openvz container would that still be legal to do? Created attachment 691288 [details]
move CLONE_NEWUTS from base flags to extended flags
I've got this patch in my current tree but I haven't tried it on older kernels yet. Please verify that it fixes your issues and it will go into the next mock release.
(In reply to comment #6) > OpenVZ: 2.6.32-042stab068.8 > > From reading the docs on CLONE_NEWUTS, it sounds like it is what a container > itself would use and since I am already running mock inside of an openvz > container would that still be legal to do? Probably not. I think the patch I just posted will do the trick (It's essentially what Richard did in #c4). Yup, that looks the same as what I did in comment #2. mock-1.1.29-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/mock-1.1.29-1.fc17 mock-1.1.29-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.29-1.el6 mock-1.1.29-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/mock-1.1.29-1.fc18 Package mock-1.1.29-1.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing mock-1.1.29-1.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-0476/mock-1.1.29-1.el6 then log in and leave karma (feedback). mock-1.1.29-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.29-1.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. |