Bug 824043

Summary: guestfish unrecognized mount option gives confusing error message
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: dyasny, mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-24 13:55:42 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:

Description Richard W.M. Jones 2012-05-22 15:47:01 UTC
Description of problem:

$ guestfish --ro -a /dev/vg_pin/F16x64 -m /dev/vda2:/

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> exit

$ guestfish --ro -a /dev/vg_pin/F16x64 -m /dev/vda2:/:blahblah
libguestfs: error: mount_options: /dev/vda2 on /: mount: wrong fs type, bad option, bad superblock on /dev/vda2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so
guestfish: '/dev/vda2' could not be mounted.  Did you mean one of these?
	/dev/sda1 (unknown)
	/dev/sda2 (ext4)
	/dev/vg_f16x64/lv_root (ext4)
	/dev/vg_f16x64/lv_swap (swap)

The error message is confusing and wrong here.  It should at least
hint that the mount option could be causing the problem.

Version-Release number of selected component (if applicable):

1.18.0.

How reproducible:

100%

Steps to Reproduce:
1. See above.

Comment 1 Richard W.M. Jones 2012-05-24 13:55:42 UTC
Fixed in commit ee9ab52bc3e087f63dcc51d3b6ac5c79277425e1.

The new error message is one of these 3 variations:


$ guestfish --ro -a /dev/vg_data/F16x64 -m /dev/vda2:/:blahblah
libguestfs: error: mount_options: /dev/vda2 on / (options: 'blahblah'): mount: wrong fs type, bad option, bad superblock on /dev/vda2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so
guestfish: '/dev/vda2' could not be mounted.
guestfish: Check mount(8) man page to ensure options 'blahblah'
guestfish: are supported by the filesystem that is being mounted.
guestfish: Did you mean to mount one of these filesystems?
guestfish: 	/dev/sda1 (unknown)
guestfish: 	/dev/sda2 (ext4)
guestfish: 	/dev/vg_f16x64/lv_root (ext4)
guestfish: 	/dev/vg_f16x64/lv_swap (swap)


$ guestfish --ro -a /dev/vg_data/F16x64 -m /dev/vg_f16x64/lv_swap:/
libguestfs: error: mount_options: /dev/vg_f16x64/lv_swap on / (options: 'ro'): mount: unknown filesystem type 'swap'
guestfish: '/dev/vg_f16x64/lv_swap' could not be mounted.
guestfish: Did you mean to mount one of these filesystems?
guestfish: 	/dev/sda1 (unknown)
guestfish: 	/dev/sda2 (ext4)
guestfish: 	/dev/vg_f16x64/lv_root (ext4)
guestfish: 	/dev/vg_f16x64/lv_swap (swap)


$ guestfish --ro -a /dev/vg_data/F16x64 -m /dev/vda8:/
libguestfs: error: mount_options: mount_options_stub: /dev/vda8: No such file or directory
guestfish: '/dev/vda8' could not be mounted.
guestfish: Did you mean to mount one of these filesystems?
guestfish: 	/dev/sda1 (unknown)
guestfish: 	/dev/sda2 (ext4)
guestfish: 	/dev/vg_f16x64/lv_root (ext4)
guestfish: 	/dev/vg_f16x64/lv_swap (swap)