Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 883877

Summary: event log is reporting general exception when mount fails on posix domain
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: vdsmAssignee: Yeela Kaplan <ykaplan>
Status: CLOSED ERRATA QA Contact: yeylon <yeylon>
Severity: high Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: abaron, acathrow, amureini, bazulay, cboyle, cpelland, ewarszaw, iheim, jkt, lpeer, mkenneth, oourfali, Rhev-m-bugs, scohen, srevivo, tnisan, yeylon, ykaplan
Target Milestone: ---Flags: scohen: Triaged+
Target Release: 3.3.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: is1 Doc Type: Bug Fix
Doc Text:
When trying to mount a file system and it failed in VDSM, incomprehensible error message were generated. The appropriate exceptions in the case of a mount error or permissions error to a mount point are now displayed.
Story Points: ---
Clone Of:
: 922554 (view as bug list) Environment:
Last Closed: 2014-01-21 16:04:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logs none

Description Dafna Ron 2012-12-05 13:41:08 UTC
Created attachment 658204 [details]
logs

Description of problem:

when I try to mount a file system with wrong params and fail in vdsm with:

OSError: [Errno 2] Mount of `filer01.qa.lab.tlv.redhta.com:/Dafna5` at `/rhev/data-center/mnt/filer01.qa.lab.tlv.redhta.com:_Dafna5` does not exist


engine logs shows general exception and event log shows the same: 

2012-12-05 15:32:39,741 ERROR [org.ovirt.engine.core.bll.storage.POSIXFSStorageHelper] (ajp-/127.0.0.1:8702-5) [57581514] The connection with details filer01.qa.lab.tlv.redhta.com:/Dafna5 failed because of error code 100 and error message is: general exception

The error code for connection filer01.qa.lab.tlv.redhta.com:/Dafna5 returned by VDSM was following General Exception


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

si24.5

How reproducible:

100%

Steps to Reproduce:
1. try to connect to a nfs directory that does not exist. 
2.
3.
  
Actual results:

The error code for connection filer01.qa.lab.tlv.redhta.com:/Dafna5 returned by VDSM was following General Exception

Expected results:

if we cannot specify exactly why we failed we should put a more human readable error in event log. 

Additional info: logs

Comment 1 Allon Mureinik 2012-12-05 17:08:47 UTC
Seems like an error translation issue in StorageHelperBase (PosixStorageHelper extends it but does not override the relevant methods).

regarldess of the version this is aimed at, it seems like an easy fix. Devel-acking.

Comment 2 Ayal Baron 2013-01-03 14:16:09 UTC
issue is that vdsm is propagating a general exception.
Need to fix in vdsm side.
getRecord (in mount.py) is throwing an OSError
        raise OSError(errno.ENOENT,
                "Mount of `%s` at `%s` does not exist" %
                (self.fs_spec, self.fs_file))
But _translateConnectionError (in hsm.py) is expecting a MountError
        if isinstance(e, mount.MountError):

Comment 4 Ayal Baron 2013-01-09 16:36:26 UTC
*** Bug 893383 has been marked as a duplicate of this bug. ***

Comment 5 Vered Volansky 2013-01-13 19:39:09 UTC
Fixed according to Ayal's comment.
http://gerrit.ovirt.org/#/c/10966
Change-Id: I0f36b3ea18690d7cf53439e5a0342b1495f4f181

Now the error code is 477, and Error message in the engine:
The connection with details server.example.com:/export/VMs failed because of error code 477 and error message is: problem while trying to mount target

Comment 9 Sean Cohen 2013-02-27 10:08:20 UTC
Duplicate of Bug 883879?

Comment 10 Eduardo Warszawski 2013-03-17 16:53:07 UTC
(In reply to comment #2)
> issue is that vdsm is propagating a general exception.
> Need to fix in vdsm side.
> getRecord (in mount.py) is throwing an OSError
>         raise OSError(errno.ENOENT,
>                 "Mount of `%s` at `%s` does not exist" %
>                 (self.fs_spec, self.fs_file))
> But _translateConnectionError (in hsm.py) is expecting a MountError
>         if isinstance(e, mount.MountError):

This trace is an artefact of any fail in the mount raising OSError.

In order to understand the real issue, patch:
http://gerrit.ovirt.org/12042
(among others)
should be applied.

Example:

Thread-2351::DEBUG::2013-03-17 03:02:48,704::misc::85::Storage.Misc.excCmd::(<lambda>) '/usr/bin/sudo -n /bin/mount -t glusterfs filer03.qa.lab.tlv.redhat.com:/DORON1 /rhev/data-center/mnt/filer03.qa.lab.tlv.redhat.com:_DORON1' (cwd None)
Thread-2351::ERROR::2013-03-17 03:02:48,798::hsm::2299::Storage.HSM::(connectStorageServer) Could not connect to storageServer
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/hsm.py", line 2296, in connectStorageServer
    conObj.connect()
  File "/usr/share/vdsm/storage/storageServer.py", line 219, in connect
    fileSD.validateDirAccess(self.getMountObj().getRecord().fs_file)
  File "/usr/share/vdsm/storage/mount.py", line 271, in getRecord
    (self.fs_spec, self.fs_file))
OSError: [Errno 2] Mount of `filer03.qa.lab.tlv.redhat.com:/DORON1` at `/rhev/data-center/mnt/filer03.qa.lab.tlv.redhat.com:_DORON1` does not exist


When the real issue is(with a patch in the spirit of 12042):
Thread-33::ERROR::2013-03-17 03:23:45,802::storageServer::212::StorageServer.MountConnection::(connect) Mount failed: (1, 'Mount failed. Please check the log file for more details.\n;/sbin/mount.glusterfs: line 130: /usr/sbin/glusterfs: Permission denied\n')
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/storageServer.py", line 210, in connect
    self._mount.mount(self.options, self._vfsType)
  File "/usr/share/vdsm/storage/mount.py", line 222, in mount
    return self._runcmd(cmd, timeout)
  File "/usr/share/vdsm/storage/mount.py", line 238, in _runcmd
    raise MountError(rc, ";".join((out, err)))
MountError: (1, 'Mount failed. Please check the log file for more details.\n;/sbin/mount.glusterfs: line 130: /usr/sbin/glusterfs: Permission denied\n')

Comment 11 Vered Volansky 2013-03-18 13:58:34 UTC
MountError was caught and swallowed after failed mount in storageServer.py .
The OSError should not have been sent or reached to begin with.

Comment 12 vvyazmin@redhat.com 2013-09-12 13:28:06 UTC
Verified, tested on RHEVM 3.3 - IS14 environment:

Host OS: RHEL 6.5

RHEVM:  rhevm-3.3.0-0.21.master.el6ev.noarch
PythonSDK:  rhevm-sdk-python-3.3.0.13-1.el6ev.noarch
VDSM:  vdsm-4.12.0-127.gitedb88bf.el6ev.x86_64
LIBVIRT:  libvirt-0.10.2-23.el6.x86_64
QEMU & KVM:  qemu-kvm-rhev-0.12.1.2-2.401.el6.x86_64
SANLOCK:  sanlock-2.8-1.el6.x86_64

Comment 15 Vered Volansky 2013-11-26 16:13:40 UTC
*** Bug 949292 has been marked as a duplicate of this bug. ***

Comment 16 Charlie 2013-11-28 00:29:55 UTC
This bug is currently attached to errata RHBA-2013:15291. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to 
minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.

Comment 19 errata-xmlrpc 2014-01-21 16:04:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0040.html

Comment 20 Red Hat Bugzilla 2023-09-14 01:39:17 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days