Change in vdsm[master]: modify safelease executable path
nsoffer at redhat.com
nsoffer at redhat.com
Wed May 20 14:53:03 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: modify safelease executable path
......................................................................
Patch Set 9:
(4 comments)
I don't want to allow configuration of safelease, and certainly not depend on get-conf-value tool during runtime. Configuration time is good enough.
https://gerrit.ovirt.org/#/c/41024/9/lib/vdsm/config.py.in
File lib/vdsm/config.py.in:
Line 245: 'allowed!)'),
Line 246:
Line 247: ('vol_extend_policy', 'ON', None),
Line 248:
Line 249: ('safelease_path', '@SAFELEASE_PATH@', None),
We don't need this configuration, use constants.py.
I don't want to allow changes here.
Line 250:
Line 251: ('lock_util_path', '@LIBEXECDIR@', None),
Line 252:
Line 253: ('lock_cmd', 'spmprotect.sh', None),
https://gerrit.ovirt.org/#/c/41024/9/vdsm/storage/clusterlock.py
File vdsm/storage/clusterlock.py:
Line 75:
Line 76: class SafeLease(object):
Line 77: log = logging.getLogger("Storage.SafeLease")
Line 78:
Line 79: safeleasePath = config.get('irs', 'safelease_path')
Not needed
Line 80: lockUtilPath = config.get('irs', 'lock_util_path')
Line 81: lockCmd = config.get('irs', 'lock_cmd')
Line 82: freeLockCmd = config.get('irs', 'free_lock_cmd')
Line 83:
Line 90: self.setParams(lockRenewalIntervalSec, leaseTimeSec, leaseFailRetry,
Line 91: ioOpTimeoutSec)
Line 92:
Line 93: def initLock(self):
Line 94: lockUtil = self.safeleasePath
Use constants.EXT_SAFELEASE
Line 95: initCommand = [lockUtil, "release", "-f", self._leasesPath, "0"]
Line 96: rc, out, err = misc.execCmd(initCommand, cwd=self.lockUtilPath)
Line 97: if rc != 0:
Line 98: self.log.warn("could not initialise spm lease (%s): %s", rc, out)
https://gerrit.ovirt.org/#/c/41024/9/vdsm/storage/protect/spmprotect.sh
File vdsm/storage/protect/spmprotect.sh:
Line 23:
Line 24: SETSID="/usr/bin/setsid"
Line 25: LOGFILE="/var/log/vdsm/spm-lock.log"
Line 26: VDS_CLIENT="/usr/bin/vdsClient"
Line 27: LEASE_UTIL="$(/usr/share/vdsm/get-conf-item /etc/vdsm/vdsm.conf irs safelease_path /usr/libexec/safelease/safelease)"
We don't want to depend on get-conf-item or allow configuration of this value. Use SAFELEASE_PATH from configure.ac.
Line 28: KILL="/bin/kill"
Line 29: PKILL="/usr/bin/pkill"
Line 30: sdUUID=$2
Line 31: CHECKVDSM=${CHECKVDSM:-"/usr/bin/pgrep vdsm"}
--
To view, visit https://gerrit.ovirt.org/41024
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ief298fe08e3b737c5c9f404675a15da4b026ca21
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list