I thought this originally, but the NFS server is setup with
no_root_squash already (netapp equiv - root=<host>).
I've worked-around the problem by just using a local disk, but does
anyone else use mock buildroots on NFS?
-----Original Message-----
From: Clark Williams [mailto:clark.williams@gmail.com]
Sent: Tuesday, March 08, 2011 4:55 PM
To: Discussion of Fedora build system
Cc: Greg Trahair
Subject: Re: Mock 'Directory not empty' error during --clean
Ah, you're being bitten by root-squash. This means that any thread
running as root gets mapped to the user nobody on the NFS server and in
general gets denied access to regular user files.
Do you have the ability to control how the NFS partition is exported or
is it controlled by your IT group? If you have control over the NFS
server you can export it with no_root_squash and things should work
properly.
I don't have a good solution for running mock on a root-squashed NFS
partition at the moment.
Clark
On Tue, 8 Mar 2011 09:45:00 +0100
"Greg Trahair" <Greg.Trahair(a)tomtom.com> wrote:
Hi Mike,
The directory is completely empty, and mock --init and mock --clean
give
the same error. Even a mock --no-clean --init gives the error.
The strange thing is that I can (as my unprivileged user) just run
rmdir
/data/mock/dist-rhel5-greg with no problems, so permissions are not
the
culprit. SELinux is disabled.
I can recreate the problem every time I run mock --init, I have to
rmdir
the buildroot before I can continue testing builds.
After a little testing, it seems that /data/mock being NFS is an
issue,
as I just changed the buildroot back to /var/lib/mock and all seems
ok.
Both /data/mock and /var/lib/mock are set 2775 root:mock.
I can't find any limitations of os.rmtree an nfs.
Regards,
Greg
-----Original Message-----
From: buildsys-bounces(a)lists.fedoraproject.org
[mailto:buildsys-bounces@lists.fedoraproject.org] On Behalf Of Mike
McLean
Sent: Monday, March 07, 2011 7:55 PM
To: buildsys(a)lists.fedoraproject.org
Subject: Re: Mock 'Directory not empty' error during --clean
On 03/07/2011 04:17 AM, Greg Trahair wrote:
> But when I attempt to clean it, this happens:
>
> $ mock -r dist-rhel5-x86_64 --uniqueext $LOGNAME --clean
...
> File "/usr/lib/python2.4/site-packages/mock/util.py", line 82, in
> rmtree
> shutil.rmtree(path, *args, **kargs)
> File "/usr/lib64/python2.4/shutil.py", line 172, in rmtree
> onerror(os.rmdir, path, sys.exc_info())
> File "/usr/lib64/python2.4/shutil.py", line 170, in rmtree
> os.rmdir(path)
> OSError: [Errno 39] Directory not empty:
'/data/mock/dist-rhel5-greg'
It's hard to know without more data. The error is happening within
os.rmtree.
Have a look at the remains that were not deleted. Is there anything
unusual about them? Is it possible another process wrote files to
directory during the clean operation? Does the problem repeat?
--
buildsys mailing list
buildsys(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
--
buildsys mailing list
buildsys(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys