Bug 1129597

Summary: adding new storage domain with nfsvers=4.1 fails
Product: [Retired] oVirt Reporter: Gal Amado <gamado>
Component: vdsmAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Gal Amado <gamado>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.5CC: acanan, amureini, bazulay, bugs, ecohen, gklein, iheim, mgoldboi, rbalakri, scohen, yeylon
Target Milestone: ---Flags: scohen: needinfo+
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-3.5.0_rc2 Doc Type: Bug Fix
Doc Text:
When creating a new Posix/NFS storage domain or editing an existing one, the mount options will be validated and the operation will fail if the mount options will contain the following options: For both NFS & Posix: vfs_type, addr, clientaddr For NFS: timeo, retrans, protocol_version, nfsvers, vers, minorversion
Story Points: ---
Clone Of:
: 1283964 (view as bug list) Environment:
Last Closed: 2014-10-17 12:40:49 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:
Bug Depends On:    
Bug Blocks: 1283964    
Attachments:
Description Flags
engine log file none

Description Gal Amado 2014-08-13 10:19:44 UTC
Created attachment 926358 [details]
engine log file

Description of problem:
When trying to add a new storage domain with nfsvers=4.1, we get a faliure msg 

vdsm try to run a mount command with both nfsvers=3,nfsvers=4.1 , that is not supported by "mount".

Version-Release number of selected component (if applicable):
oVirt Engine Version: 3.5.0-0.0.master.20140804172041.git23b558e.el6
vdsm-4.16.1-6.gita4a4614.el6.x86_64

How reproducible:
happens all the time 

Steps to Reproduce:
setup: I've used up and running setup with 2 hosts and 2 iSCSI SD's , and 1 VM 

2.through GUI, Storage tab I've added "New Domain"  
3.Default Domain Function / Storage Type - Data/NFS
4.Fill in valid name and Export Path
5.Expand Advanced parameter
6.Check "Override Default Options"
7.Add "nfsvers=4.1" in "Additional mount options"
8.click OK

Actual results:
Operation Failes with a general Error msg "Error while executing action Add Storage Connection: Problem while trying to mount target"

in vdsm.log we see a bad mount call with double param value (nfsvers=3,nfsvers=4.1)

Expected results:
actually we need a definition on what to expect :
- block it on the GUI level, and give a specific msg.
- override of one version param over the other.

Additional info:
/bin/mount -t nfs -o soft,nosharecache,timeo
=600,retrans=6,nfsvers=3,nfsvers=4.1 netapp.qa.la
b.tlv.redhat.com:/vol/vol_gamado_nfs01 /rhev/data
-center/mnt/netapp.qa.lab.tlv.redhat.com:_vol_vol
__gamado__nfs01 (cwd None)
Thread-15::ERROR::2014-08-13 12:44:38,341::storag
eServer::211::Storage.StorageServer.MountConnecti
on::(connect) Mount failed: (32, ';mount.nfs: Pro
tocol not supported\n')
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/storageServer.py"
, line 209, in connect
    self._mount.mount(self.options, self._vfsType)
  File "/usr/share/vdsm/storage/mount.py", line 198, in mount
    return self._runcmd(cmd, timeout)
  File "/usr/share/vdsm/storage/mount.py", line 214, in _runcmd
    raise MountError(rc, ";".join((out, err)))
MountError: (32, ';mount.nfs: Protocol not supported\n')
Thread-15::ERROR::2014-08-13 12:44:38,341::hsm::2427::Storage.HSM::(connectStorageServer) Could not connect to storageServer
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/hsm.py", line 2424, in connectStorageServer
    conObj.connect()
  File "/usr/share/vdsm/storage/storageServer.py"
, line 328, in connect
    return self._mountCon.connect()
  File "/usr/share/vdsm/storage/storageServer.py", line 217, in connect
    raise e
MountError: (32, ';mount.nfs: Protocol not supported\n')

Comment 1 Allon Mureinik 2014-08-13 11:34:31 UTC
Sean - what's the required behavior here?

Comment 2 Sean Cohen 2014-08-27 15:38:22 UTC
Typically in the industry the default behavior is to attempt mounting first with NFS v4.1, then silently fall back to NFS v3.0 if necessary. 

In our case, when nfsvers=4.1 is selected and the backend does not support then we should notify the user with the relevant error - sometimes the user may specifically require the 4.1 and if we fail back to v3.0 we should also report that..

The question is how do we add the logic for it in vdsm?

Sean

Comment 3 Allon Mureinik 2014-08-27 16:27:41 UTC
This is neither urgent nor a blocker for the feature - it's a bad handling for a REALLY bad configuration, which no user will ever perform.

Comment 4 Allon Mureinik 2014-08-28 08:36:33 UTC
Talked to Sean - we need to block setting nfsvers (with a CDA) for 3.5, and should look into properly supporting NFS 4.1 for 3.6.

Comment 5 Allon Mureinik 2014-09-04 14:22:35 UTC
Tal, when filling in the doctext, please make sure to specify which options have been blocked.

Comment 6 Aharon Canan 2014-09-15 12:31:02 UTC
verified, 

nfsvers is blocked.

Comment 7 Sandro Bonazzola 2014-10-17 12:40:49 UTC
oVirt 3.5 has been released and should include the fix for this issue.