Greg Padgett has posted comments on this change.
Change subject: storage: Don't ignore nfs_mount_options in vdsm.conf
......................................................................
Patch Set 13: (4 inline comments)
Thanks Dan, replies inline, and agreed with respect to additional scrutiny needed for the
posix/nfs issue.
....................................................
File vdsm/storage/alerts.py
Line 28: alerts = []
Line 29:
Line 30: # FIXME: Remove when nfs_mount_options is no longer supported
Line 31: nfs_config = config.get('irs',
'nfs_mount_options').replace(' ', '')
Line 32: if len(frozenset(nfs_config.split(',')) ^
np, I'll change it to != when rebasing
Line 33: frozenset(NFSConnection.DEFAULT_OPTIONS)) > 0:
Line 34: alert = se.MiscDeprecatedNFSOptions(nfs_config)
Line 35: alerts.append({'code': alert.code,
Line 36: 'message': alert.message,
....................................................
File vdsm/storage/hsm.py
Line 159: conDict.get('retrans', None),
Line 160: conDict.get('timeout', None)) == (None, None, None):
Line 161: conf_options = (config.get('irs',
'nfs_mount_options')
Line 162: .replace(' ', ''))
Line 163: if len(frozenset(conf_options.split(',')) ^ frozenset(
Same as alerts.py, I'll change this one as well
Line 164: storageServer.NFSConnection.DEFAULT_OPTIONS)) > 0:
Line 165: logging.warning("Using deprecated nfs_mount_options
from"
Line 166: " vdsm.conf to mount %s: %s",
Line 167: conDict.get('connection', '(unknown)'),
conf_options)
Line 177: conDict.get('connection', None))
Line 178: elif typeName == 'nfs':
Line 179: params = tryDeprecatedNfsParams(conDict)
Line 180: if params is not None:
Line 181: # Hack to support vdsm.conf nfs_mount_options
It was between this or giving NFSConnection.__init__ an "options" param for
general options (Saggi didn't like that too much). I tested by switching options back
and forth for the same sd, mounting on multiple hosts (one with sd mounted with nfs, one
via posix), etc. and it seems to work /today/ ... realizing of course that the future
compatibility may be less certain.
Line 182: typeName = 'posixfs'
Line 183: else:
Line 184: version = conDict.get('protocol_version', "3")
Line 185: version = str(version)
....................................................
File vdsm/storage/storage_exception.py
Line 173: code = 2008
Line 174: message = "Directory cleanup failure"
Line 175:
Line 176:
Line 177: class MiscDeprecatedNFSOptions(StorageException):
I looked for a "storage general exception" category, but misc was the best I
could come up with (didn't know it was for misc.py). If anyone is concerned enough
about its naming/placement I'm open to suggestions of where to move it.
Line 178: def __init__(self, options):
Line 179: self.value = "options=%s" % (options,)
Line 180: code = 2009
Line 181: message = "Using deprecated nfs_mount_options parameter from
vdsm.conf."\
--
To view, visit
http://gerrit.ovirt.org/5368
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I3c1d13bfd98a9b41b9728bdcb7f01b3161c26bd8
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadgett(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadgett(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Shu Ming <shuming(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server