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
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')
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
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')