rmdir on non-empty directory does not fail

Bug #587917 reported by Wolf Geldmacher
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
unionfs-fuse (Ubuntu)
Confirmed
Undecided
Bernd Schubert

Bug Description

Binary package hint: unionfs-fuse

Ubuntu Release:
        10.04 / Lucid Lynx
Package Version:
        unionfs-fuse 0.23.hg.20090611-1

Running the following command sequence:

01 $ cd /tmp
02 $ mkdir tmp
03 $ cd tmp
04 $ ls
05 $ mkdir ro ro/subdir rw union
06 $ touch ro/subdir/file
07 $ unionfs-fuse -o cow /tmp/tmp/rw=RW:/tmp/tmp/ro=RO /tmp/tmp/union
08 $ ls -l union/subdir
insgesamt 0
-rw-r--r-- 1 wjg wjg 0 2010-05-31 16:09 file
09 $ rmdir union/subdir
10 $ ls -l union/subdir
ls: Zugriff auf union/subdir nicht möglich: No such file or directory
11 $ fusermount -u /tmp/tmp/union

Expected outcome:
        I expect the command on line 09 to fail, as the directory union/subdir is not empty.

Actual outcome:
        Instead it succeeds. The contents below the directory are "lost".

Some additional context:
I want to use unionfs-fuse in the context of the Ubuntu Customization Toolkit to avoid having to extract ISO and squashfs images. Several (python) packages do a "rmdir -f /usr/lib/pymodules/python2.6/*" to clean up packages no longer relevant, relying on rmdir to fail silently when there are non-empty directories. Unfortunately this strategy does not work with unionfs-fuse and makes it unusable for UCK.

Revision history for this message
Bernd Schubert (aakef) wrote :

Thanks for your report Wolfgang. I just fixed that in my 0.25 branch:
http://podgorny.cz/~bernd/hg/hgwebdir.cgi/0.25

Building should be easy, but if you should need a package, I can also upload it to my home page.

However, I'm presently out of ideas what I shall do about Debian and Ubuntu. I'm one of the upstream authors and also the package maintainer. However, as I'm not a DD (debian developer) I cannot upload to Debian without a sponsor. But already for a couple of months, I cannot find a sponsor for this package (a newer version is at mentors.debian.net for a long time already). And Ubuntu simply takes the Debian package. Unless I find a sponsor within the next two weeks, I will request to remove that package from Debian and Ubuntu, as both ship a broken beta version and do not let me fix it. IMHO it is out of question to list me for something which impossible to fulfill.

Thanks,
Bernd

Changed in unionfs-fuse (Ubuntu):
assignee: nobody → Bernd Schubert (aakef)
Revision history for this message
Wolf Geldmacher (wolf-womaro) wrote :

Thanks a lot for your speedy response.

I downloaded, built and installed your patched version and can confirm that the problem is solved.

Now I've encountered another issue with unionfs-fuse, though: Within the union mount the directory .unionfs is visible - which IMHO it should not be. Do you want me to open a separated bug report for this as it's obviously not related to the rmdir issue?

Revision history for this message
Bernd Schubert (aakef) wrote :

Hello Wolfgang,

I'm glad that it works :) Version 0.25 is still a bit experimental, but thans to several Gentoo users, which seem to do similar things as you do, I got a chance to debug it.

And again thanks to Gentoo you are luckily, 0.25 includes a new feature to hide the metadata directory.

-o hide_meta_dir

It is optional to hide that directory, as it will slightly slow down unionfs-fuse and at is not important to hide that directory for diskless NFS environments and live USB-sticks (those two are my own usage pattern).

Cheers,
Bernd

Revision history for this message
Wolf Geldmacher (wolf-womaro) wrote : Re: [Bug 587917] Re: rmdir on non-empty directory does not fail

Hi Bernd,

tried that option - works as specified, but only solves half my problem
as now I have files named '.fuse_hidden[0-9]*' in some directories - one
of them being the image of the previous rootfs blowing the new ISO to
double the size. I've now changed the strategy to exclude .unionfs
and .fuse_hidden* files from being included - seems to work.

Thanks again for your support!
Wolf

Am Dienstag, den 01.06.2010, 09:10 +0000 schrieb Bernd Schubert:
> Hello Wolfgang,
>
> I'm glad that it works :) Version 0.25 is still a bit experimental, but
> thans to several Gentoo users, which seem to do similar things as you
> do, I got a chance to debug it.
>
> And again thanks to Gentoo you are luckily, 0.25 includes a new feature
> to hide the metadata directory.
>
> -o hide_meta_dir
>
> It is optional to hide that directory, as it will slightly slow down
> unionfs-fuse and at is not important to hide that directory for diskless
> NFS environments and live USB-sticks (those two are my own usage
> pattern).
>
>
> Cheers,
> Bernd
>

--
Just when you discovered the meaning of life IT changed.

Revision history for this message
Bernd Schubert (aakef) wrote :

Hello Wolfgang,

next try, could you please pull from my branch again, it should now also hide .fuse_hidden files. The option is now called
-o hide_meta_files and -o hide_meta_dir is deprecated, although it still exists.

Thanks,
Bernd

Bernd Schubert (aakef)
Changed in unionfs-fuse (Ubuntu):
status: New → Confirmed
status: Confirmed → Fix Committed
Revision history for this message
JC Hulce (soaringsky) wrote :

This bug has been marked as Fix Committed for over a year. If the fix has made it into Ubuntu, please mark this bug as Fix Released. If the fix has been released upstream, but not Ubuntu, create a new bug asking for the new version and tag it with upgrade-software-version. If this bug has not been fixed anywhere, change the status back to Confirmed.

Revision history for this message
Francois Gouget (fgouget) wrote :

This bug is still present in Ubuntu 14.10 with unionfs-fuse 0.24-2.2ubuntu.

Changed in unionfs-fuse (Ubuntu):
status: Fix Committed → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.