Greg Padgett has uploaded a new change for review.

Change subject: storage: Default to NFSv3 if version not specified
......................................................................

storage: Default to NFSv3 if version not specified

Unexpectedly switching to NFSv4 during e.g. upgrades from 3.0 to 3.1
can cause permissions issues.  Unless explicitly set, use v3 as the
default.  (By default, engine doesn't pass a version for SPs with
compatibility version 2.2 or 3.0.)

Bug-Url: https://bugzilla.redhat.com/855729
Change-Id: I83307ecd8262688f3d4ddb43b62a79924ecfc62c
Signed-off-by: Greg Padgett <[email protected]>
---
M vdsm/storage/storageServer.py
1 file changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/8241/1

diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index a7dda01..148d446 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -229,9 +229,9 @@
 
     @property
     def version(self):
-        if self._version is not None:
+        if self._version != 'auto':
             return self._version
-
+ 
         # Version was not specified but if we are connected we can figure out
         # the negotiated version
         mnt = self._mountCon.getMountObj()
@@ -249,16 +249,15 @@
         return -1
 
 
-    def __init__(self, export, timeout=600, retrans=6, version=None):
+    def __init__(self, export, timeout=600, retrans=6, version=3):
         self._remotePath = normpath(export)
-        self._version = version
         options = self.DEFAULT_OPTIONS[:]
         self._timeout = timeout
         self._version = version
         self._retrans = retrans
         _addIntegerOption(options, "timeo", timeout)
         _addIntegerOption(options, "retrans", retrans)
-        if version:
+        if version != 'auto':
             _addIntegerOption(options, "vers", version)
 
         self._mountCon = MountConnection(export, "nfs", ",".join(options))


--
To view, visit http://gerrit.ovirt.org/8241
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83307ecd8262688f3d4ddb43b62a79924ecfc62c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to