Closed bviswana101 closed 7 years ago
I'm not able to have this issue. Normally run it as "privileged" user in Docker should prevent it, right? Then, q thing we can say, it that using this latest version, which is not cleaning the build environment at any build (to speedup a continuous build) should prevent this error.
Can you please check it and let us know if it is working better?
I've just hit the same issue... @bviswana101 Did you manage a work-around?
OS X 10.11, Docker 1.12.1, Docker-Machine 0.8.1.
Same issue here: OS X 10.12.1 Docker: 1.12.3, build 6b644ec docker-machine 0.8.2, build e18a919
Taking a stab in the dark here, is the operation that's failing here, the chroot environment setup? It would make sense that this relatively low level operation would not be possible across a linux guest and macOS (essentially BSD) host. BSD does of course have it's own chroot implementation along with the BSD Jail system but I don't know how the lowest levels of these implementations differ. It may be the case that docker's isolation (Not emulation) of Linux containers on mac does not accommodate chroot operations.
UPDATE:
I've now tested using a RHEL 7.1 host environment. In both cases, RHEL and MacOS host, I used '--privileged' privileged containers. Now, there are a whole set of far more granular privileges that can be specified within Docker, so it may be valuable to spell out which granular privileges are required, documenting an updated run command.
Thanks for this update. I will try to check about the privileges we need for the container. I though it was anything related to the network stuff (to create a mock environment)... but I don't remember and I'm not sure. I'm going to test.
I just built a new RPM on my OSx and all is fine. I just found a problem related to the btrfs you were talking about: if I run the docker command into the folder I'm setting as volume for the Docker. In this case there are problem mounting and using it in the container. If you run it somewhere else all is good to me (I was able to build git from src.rpm or one other rpm got from repo.mornati.net).
Thanks for a very useful Docker container. Hitting the following error
DEBUG util.py:468: Executing command: ['btrfs', 'subv', 'list', '/var/lib/mock'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell False DEBUG util.py:393: ERROR: can't perform the search -Inappropriate ioctl for device DEBUG util.py:393: ERROR: can't get rootid for '/var/lib/mock'
Might be related to running mock within a container, and to https://bugzilla.redhat.com/show_bug.cgi?id=1205564
I am seeing this in mock1.2.13. Can we do any workaround within the container to handle this gracefully.