[Libguestfs] minor usability issue: confusing error message with guestmount + fuse errors

Richard W.M. Jones rjones at redhat.com
Tue Nov 14 09:43:03 UTC 2017


[Sorry for missing this email]

On Mon, Nov 06, 2017 at 04:04:18PM -0700, Assaf Gordon wrote:
> Hello,
> 
> Using older libguestfs 1.34.6-2 (from Ubuntu's standard package),
> I encountered this:
> 
> libguestfs fails with an error, but the error code is "success":
> 
>   $ sudo guestmount -m /dev/sda1 --ro \
>                     -o allow_others \
>                     -a data.qcow2 \
>                     /media/foo
>   fuse: unknown option `allow_others'
>   libguestfs: error: fuse_new: /media/foo/: Success
>
> Other fuse errors also cause the same behavior,
> e.g. mounting to an already-mounted directory:
> 
>   $ sudo guestmount -m /dev/sda1 --ro -a data2.qcow2 /media/foo
>   /media/foo mountpoint is not empty
>   fuse: mountpoint is not empty
>   fuse: if you are sure this is safe, use the 'nonempty' mount option
>   libguestfs: error: fuse_mount: /media/foo: Success

I can reproduce this bug:

  $ touch mnt/foo
  $ guestmount -a test1.img -m /dev/sda1 /var/tmp/mntfuse: mountpoint is not empty
  fuse: if you are sure this is safe, use the 'nonempty' mount option
  libguestfs: error: fuse_mount: /var/tmp/mnt: Success

I added this fix:

  https://github.com/libguestfs/libguestfs/commit/a88385add653c4fc2592639d72b638f693798091

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list