Change in vdsm[ovirt-4.1]: storage: Add LibgfApi support as additional feature
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: storage: Add LibgfApi support as additional feature
......................................................................
Patch Set 3: Code-Review-1
the bug is set for 4.1.5. let's stall this patch until 4.1.4 is out.
otherwise, we may need to fork out ovirt-4.1.4 branch.
--
To view, visit https://gerrit.ovirt.org/79605
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0aac04c144ae647aad1c0714379246060f4e991f
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.1
Gerrit-Owner: Denis Chaplygin <dchaplyg(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Denis Chaplygin <dchaplyg(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
6 years, 2 months
Change in vdsm[master]: introduce common.constants
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: introduce common.constants
......................................................................
introduce common.constants
Several constants are used by all vdsm subsystems. This patch itroduces
common.constants to host them. I do not simply move vdsm.constants into
vdsm.common.constants in order to scrutinize better which constants are
placed in common.
Change-Id: I8568a806f9195007620d15eff59e72b55042557b
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M .gitignore
M lib/vdsm/common/Makefile.am
A lib/vdsm/common/constants.py.in
M lib/vdsm/constants.py.in
4 files changed, 40 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/79692/1
diff --git a/.gitignore b/.gitignore
index e334131..7786c6c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,6 +27,7 @@
init/systemd/vdsm-tmpfiles.d.conf
init/vdsmd_init_common.sh
lib/vdsm/api/vdsm-api.html
+lib/vdsm/common/constants.py
lib/vdsm/config.py
lib/vdsm/constants.py
lib/vdsm/dsaversion.py
diff --git a/lib/vdsm/common/Makefile.am b/lib/vdsm/common/Makefile.am
index a7ed5da..447e4e8 100644
--- a/lib/vdsm/common/Makefile.am
+++ b/lib/vdsm/common/Makefile.am
@@ -21,4 +21,13 @@
SUBDIRS = network
vdsmcommondir = $(vdsmpylibdir)/common
+
+nodist_vdsmcommon_PYTHON = \
+ constants.py \
+ $(NULL)
+
dist_vdsmcommon_PYTHON = *.py
+
+EXTRA_DIST = \
+ constants.py.in \
+ $(NULL)
diff --git a/lib/vdsm/common/constants.py.in b/lib/vdsm/common/constants.py.in
new file mode 100644
index 0000000..e657f06
--- /dev/null
+++ b/lib/vdsm/common/constants.py.in
@@ -0,0 +1,26 @@
+#
+# Copyright 2009-2017 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+
+from __future__ import absolute_import
+
+P_VDSM = '@VDSMDIR@/' # NOQA: E501 (potentially long line)
+P_VDSM_HOOKS = '@HOOKSDIR@/' # NOQA: E501 (potentially long line)
+P_VDSM_LIB = '@VDSMLIBDIR@/' # NOQA: E501 (potentially long line)
+P_VDSM_RUN = '@VDSMRUNDIR@/' # NOQA: E501 (potentially long line)
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index 32c87d9..7b2a055 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -23,6 +23,10 @@
from __future__ import absolute_import
import os
+from vdsm.common.constants import ( # NOQA: F401 (intentionally exposed here)
+ P_VDSM, P_VDSM_HOOKS, P_VDSM_LIB,
+ P_VDSM_RUN)
+
GLUSTER_MGMT_ENABLED = bool(@GLUSTER_MGMT@)
# SMBIOS manufacturer
@@ -72,10 +76,6 @@
#
P_LIBVIRT_VMCHANNELS = '/var/lib/libvirt/qemu/channels/'
P_OVIRT_VMCONSOLES = '/var/run/ovirt-vmconsole-console/'
-P_VDSM = '@VDSMDIR@/' # NOQA: E501 (potentially long line)
-P_VDSM_HOOKS = '@HOOKSDIR@/' # NOQA: E501 (potentially long line)
-P_VDSM_LIB = '@VDSMLIBDIR@/' # NOQA: E501 (potentially long line)
-P_VDSM_RUN = '@VDSMRUNDIR@/' # NOQA: E501 (potentially long line)
P_VDSM_STORAGE = os.path.join(P_VDSM_RUN, 'storage/')
P_VDSM_CONF = '@CONFDIR@/' # NOQA: E501 (potentially long line)
P_VDSM_KEYS = '/etc/pki/vdsm/keys/'
--
To view, visit https://gerrit.ovirt.org/79692
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8568a806f9195007620d15eff59e72b55042557b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 2 months
Change in vdsm[master]: net.tc_tests: mock BONDING_DEFAULTS
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: net.tc_tests: mock BONDING_DEFAULTS
......................................................................
net.tc_tests: mock BONDING_DEFAULTS
I don't really understand how this popped up suddely, but various
tc_tests failed on CI due to trying to read from
/usr/share/vdsm/bonding-defaults.json
Change-Id: I99824c5b1fad63b5f07b4ad40c3e134cc98d91c6
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/network/tc_test.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/02/79702/1
diff --git a/tests/network/tc_test.py b/tests/network/tc_test.py
index 4cb8aa6..dd9b3a3 100644
--- a/tests/network/tc_test.py
+++ b/tests/network/tc_test.py
@@ -400,6 +400,7 @@
@MonkeyClass(libvirtconnection, 'get', Connection)
@expandPermutations
+(a)mock.patch.object(sysfs_options, 'BONDING_DEFAULTS', bonding_default_fpath())
class TestConfigureOutbound(TestCaseBase):
def setUp(self):
self.device = Dummy()
--
To view, visit https://gerrit.ovirt.org/79702
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I99824c5b1fad63b5f07b4ad40c3e134cc98d91c6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 2 months
Change in vdsm[master]: net tests: Patch BONDING_DEFAULTS on package level
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged. ( https://gerrit.ovirt.org/79810 )
Change subject: net tests: Patch BONDING_DEFAULTS on package level
......................................................................
net tests: Patch BONDING_DEFAULTS on package level
Multiple tests are dependent on BONDING_DEFAULTS.
Several tests (see tc_test module) are dependent on the bonding defaults
but do not specify it (by patching it).
These tests have been passing so far by chance: one of the patched tests
have been chosen to run first.
If an unpatched test runs first, it will fail.
This patch is patching the BONDING_DEFAULTS at package level once,
removing the need to patch individual tests.
Change-Id: I7ea0c3783b4b9224320dc643b801d93808b14fee
Signed-off-by: Edward Haas <edwardh(a)redhat.com>
---
M tests/network/__init__.py
M tests/network/link_bond_test.py
M tests/network/models_test.py
M tests/network/netinfo_test.py
4 files changed, 18 insertions(+), 13 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Dan Kenigsberg: Looks good to me, approved
Edward Haas: Verified
--
To view, visit https://gerrit.ovirt.org/79810
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ea0c3783b4b9224320dc643b801d93808b14fee
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
6 years, 2 months
Change in vdsm[master]: net tests: Patch BONDING_DEFAULTS on package level
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: net tests: Patch BONDING_DEFAULTS on package level
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.ovirt.org/79810
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7ea0c3783b4b9224320dc643b801d93808b14fee
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
6 years, 2 months
Change in vdsm[ovirt-4.1]: m2c: uses different protocol constant names
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has posted comments on this change.
Change subject: m2c: uses different protocol constant names
......................................................................
Patch Set 3:
(1 comment)
https://gerrit.ovirt.org/#/c/79664/3/lib/vdsm/m2cutils.py
File lib/vdsm/m2cutils.py:
Line 331: excludes = 0
Line 332:
Line 333: for no_protocol in config.get('vars', 'ssl_excludes').split(','):
Line 334: if no_protocol != '':
Line 335: protocol = 'SSL_' + no_protocol.strip()
if user entered SSL_OP_NO_TLSv1_1 now you have a bug
Line 336: if protocol == 'SSL_OP_NO_TLSv1_1':
Line 337: # not all m2crypto provide this constant
Line 338: excludes |= 268435456
Line 339: else:
--
To view, visit https://gerrit.ovirt.org/79664
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6c05bddfba94d85e2c48122b6fd56d8f336d01f5
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.1
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
6 years, 2 months
Change in vdsm[master]: move constants.P_VDSM_STORAGE to storage.constants
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: move constants.P_VDSM_STORAGE to storage.constants
......................................................................
move constants.P_VDSM_STORAGE to storage.constants
Change-Id: I4bf8cbe4a8c435d93e7683336d5334880de1a811
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/constants.py.in
M lib/vdsm/storage/blockSD.py
M lib/vdsm/storage/constants.py
M lib/vdsm/storage/fileSD.py
M lib/vdsm/storage/sd.py
5 files changed, 6 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/79741/1
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index f851065..66c669b 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -63,7 +63,6 @@
P_VDSM_HOOKS = '@HOOKSDIR@/' # NOQA: E501 (potentially long line)
P_VDSM_LIB = '@VDSMLIBDIR@/' # NOQA: E501 (potentially long line)
P_VDSM_RUN = '@VDSMRUNDIR@/' # NOQA: E501 (potentially long line)
-P_VDSM_STORAGE = os.path.join(P_VDSM_RUN, 'storage/')
P_VDSM_CONF = '@CONFDIR@/' # NOQA: E501 (potentially long line)
P_VDSM_LOG = '@VDSMLOGDIR@' # NOQA: E501 (potentially long line)
diff --git a/lib/vdsm/storage/blockSD.py b/lib/vdsm/storage/blockSD.py
index 90844c8..44d721d 100644
--- a/lib/vdsm/storage/blockSD.py
+++ b/lib/vdsm/storage/blockSD.py
@@ -901,7 +901,7 @@
"""
Remove /run/vdsm/storage/sdUUID/imgUUID/volUUID
"""
- vol_run_link = os.path.join(constants.P_VDSM_STORAGE,
+ vol_run_link = os.path.join(sc.P_VDSM_STORAGE,
self.sdUUID, imgUUID, volUUID)
self.log.info("Unlinking volme runtime link: %r", vol_run_link)
try:
@@ -1312,7 +1312,7 @@
srcImgPath: Dir where the image volumes are.
"""
- sdRunDir = os.path.join(constants.P_VDSM_STORAGE, self.sdUUID)
+ sdRunDir = os.path.join(sc.P_VDSM_STORAGE, self.sdUUID)
imgRunDir = os.path.join(sdRunDir, imgUUID)
fileUtils.createdir(imgRunDir)
for volUUID in volUUIDs:
diff --git a/lib/vdsm/storage/constants.py b/lib/vdsm/storage/constants.py
index 2fb929b..e282c2f 100644
--- a/lib/vdsm/storage/constants.py
+++ b/lib/vdsm/storage/constants.py
@@ -196,3 +196,5 @@
# accepts currently its all of the version but in the
# future we might slice it (eg. tuple(DOMAIN_VERSION[1:]))
SUPPORTED_DOMAIN_VERSIONS = DOMAIN_VERSIONS
+
+P_VDSM_STORAGE = os.path.join(constants.P_VDSM_RUN, 'storage/')
diff --git a/lib/vdsm/storage/fileSD.py b/lib/vdsm/storage/fileSD.py
index b9160d0..861b299 100644
--- a/lib/vdsm/storage/fileSD.py
+++ b/lib/vdsm/storage/fileSD.py
@@ -545,7 +545,7 @@
srcImgPath: Dir where the image volumes are.
"""
- sdRunDir = os.path.join(constants.P_VDSM_STORAGE, self.sdUUID)
+ sdRunDir = os.path.join(sc.P_VDSM_STORAGE, self.sdUUID)
fileUtils.createdir(sdRunDir)
imgRunDir = os.path.join(sdRunDir, imgUUID)
self.log.debug("Creating symlink from %s to %s", srcImgPath, imgRunDir)
diff --git a/lib/vdsm/storage/sd.py b/lib/vdsm/storage/sd.py
index d66a1a2..5b9ece0 100644
--- a/lib/vdsm/storage/sd.py
+++ b/lib/vdsm/storage/sd.py
@@ -979,7 +979,7 @@
getLinkBCImagePath = getImageDir
def getImageRundir(self, imgUUID):
- return os.path.join(constants.P_VDSM_STORAGE, self.sdUUID, imgUUID)
+ return os.path.join(sc.P_VDSM_STORAGE, self.sdUUID, imgUUID)
def getIsoDomainImagesDir(self):
return self._manifest.getIsoDomainImagesDir()
--
To view, visit https://gerrit.ovirt.org/79741
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4bf8cbe4a8c435d93e7683336d5334880de1a811
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 2 months
Change in vdsm[master]: move constants.SUPPORTED_DOMAIN_VERSIONS to storage.constants
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: move constants.SUPPORTED_DOMAIN_VERSIONS to storage.constants
......................................................................
move constants.SUPPORTED_DOMAIN_VERSIONS to storage.constants
DOMAIN_VERSIONS and SUPPORTED_DOMAIN_VERSIONS belong to storage
subsystem.
Change-Id: Ib8ed048c8f36964a209186ebfefd62a899700277
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/API.py
M lib/vdsm/constants.py.in
M lib/vdsm/storage/constants.py
M lib/vdsm/storage/hsm.py
M lib/vdsm/storage/sd.py
5 files changed, 13 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/79732/1
diff --git a/lib/vdsm/API.py b/lib/vdsm/API.py
index 8e7f745..0bbfb45 100644
--- a/lib/vdsm/API.py
+++ b/lib/vdsm/API.py
@@ -932,7 +932,7 @@
return self._irs.attachStorageDomain(self._UUID, storagepoolID)
def create(self, domainType, typeArgs, name, domainClass,
- version=constants.SUPPORTED_DOMAIN_VERSIONS[0]):
+ version=sc.SUPPORTED_DOMAIN_VERSIONS[0]):
return self._irs.createStorageDomain(domainType, self._UUID, name,
typeArgs, domainClass, version)
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index 68c8b7a..a123a26 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -51,16 +51,6 @@
# Libvirt selinux
LIBVIRT_SELINUX = '@ENABLE_LIBVIRT_SELINUX@' == 'yes'
-
-# This is the domain version translation list
-# DO NOT CHANGE OLD VALUES ONLY APPEND
-DOMAIN_VERSIONS = (0, 2, 3, 4)
-
-# This contains the domains versions that this VDSM
-# accepts currently its all of the version but in the
-# future we might slice it (eg. tuple(DOMAIN_VERSION[1:]))
-SUPPORTED_DOMAIN_VERSIONS = DOMAIN_VERSIONS
-
MEGAB = 2 ** 20 # = 1024 ** 2 = 1 MiB
GIB = 1024 * MEGAB
diff --git a/lib/vdsm/storage/constants.py b/lib/vdsm/storage/constants.py
index d08f688..8ee108e 100644
--- a/lib/vdsm/storage/constants.py
+++ b/lib/vdsm/storage/constants.py
@@ -185,3 +185,13 @@
TAG_PREFIX_IMAGE,
TAG_PREFIX_MD,
TAG_PREFIX_MDNUMBLKS]
+
+
+# This is the domain version translation list
+# DO NOT CHANGE OLD VALUES ONLY APPEND
+DOMAIN_VERSIONS = (0, 2, 3, 4)
+
+# This contains the domains versions that this VDSM
+# accepts currently its all of the version but in the
+# future we might slice it (eg. tuple(DOMAIN_VERSION[1:]))
+SUPPORTED_DOMAIN_VERSIONS = DOMAIN_VERSIONS
diff --git a/lib/vdsm/storage/hsm.py b/lib/vdsm/storage/hsm.py
index 3d04b80..418ff6f 100644
--- a/lib/vdsm/storage/hsm.py
+++ b/lib/vdsm/storage/hsm.py
@@ -2489,7 +2489,7 @@
@public
def createStorageDomain(self, storageType, sdUUID, domainName,
typeSpecificArg, domClass,
- domVersion=constants.SUPPORTED_DOMAIN_VERSIONS[0],
+ domVersion=sc.SUPPORTED_DOMAIN_VERSIONS[0],
options=None):
"""
Creates a new storage domain.
diff --git a/lib/vdsm/storage/sd.py b/lib/vdsm/storage/sd.py
index d1964ba..d66a1a2 100644
--- a/lib/vdsm/storage/sd.py
+++ b/lib/vdsm/storage/sd.py
@@ -206,7 +206,7 @@
def validateDomainVersion(version):
- if version not in constants.SUPPORTED_DOMAIN_VERSIONS:
+ if version not in sc.SUPPORTED_DOMAIN_VERSIONS:
raise se.UnsupportedDomainVersion(version)
--
To view, visit https://gerrit.ovirt.org/79732
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8ed048c8f36964a209186ebfefd62a899700277
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 2 months
Change in vdsm[master]: drop constants.EXT_PYTHON
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: drop constants.EXT_PYTHON
......................................................................
drop constants.EXT_PYTHON
commands_test can use any python, and gluster.gfapi's ugly hack may well
use its own private cconstant.
Change-Id: I826a89d4b63f0b4217173795638600a533a82f5c
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/constants.py.in
M lib/vdsm/gluster/gfapi.py
M tests/commands_test.py
3 files changed, 4 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/79733/1
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index a123a26..f851065 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -105,8 +105,6 @@
EXT_NICE = '@NICE_PATH@'
-EXT_PYTHON = '@PYTHON@'
-
EXT_SETSID = '@SETSID_PATH@'
EXT_SH = '/bin/sh' # The shell path is invariable
EXT_SU = '@SU_PATH@'
diff --git a/lib/vdsm/gluster/gfapi.py b/lib/vdsm/gluster/gfapi.py
index cafb9e0..4976a53 100644
--- a/lib/vdsm/gluster/gfapi.py
+++ b/lib/vdsm/gluster/gfapi.py
@@ -27,6 +27,7 @@
from . import gluster_mgmt_api
+EXT_PYTHON = '/usr/bin/python2'
GLUSTER_VOL_PROTOCOL = 'tcp'
GLUSTER_VOL_HOST = 'localhost'
GLUSTER_VOL_PORT = 24007
@@ -217,7 +218,7 @@
port=GLUSTER_VOL_PORT,
protocol=GLUSTER_VOL_PROTOCOL):
module = "vdsm.gluster.gfapi"
- command = [constants.EXT_PYTHON, '-m', module, '-v', volumeName,
+ command = [EXT_PYTHON, '-m', module, '-v', volumeName,
'-p', str(port), '-H', host, '-t', protocol, '-c', 'statvfs']
# to include /usr/share/vdsm in python path
@@ -248,7 +249,7 @@
port=GLUSTER_VOL_PORT,
protocol=GLUSTER_VOL_PROTOCOL):
module = "gluster.gfapi"
- command = [constants.EXT_PYTHON, '-m', module, '-v', volumeName,
+ command = [EXT_PYTHON, '-m', module, '-v', volumeName,
'-p', str(port), '-H', host, '-t', protocol, '-c', 'readdir']
# to include /usr/share/vdsm in python path
diff --git a/tests/commands_test.py b/tests/commands_test.py
index 8b12357..b7f42db 100644
--- a/tests/commands_test.py
+++ b/tests/commands_test.py
@@ -58,7 +58,7 @@
@permutations(CMD_TYPES)
def testSetSid(self, cmd):
- cmd_args = (constants.EXT_PYTHON, '-c',
+ cmd_args = ('python', '-c',
'import os; print os.getsid(os.getpid())')
rc, out, _ = commands.execCmd(cmd(cmd_args), setsid=True)
self.assertNotEquals(int(out[0]), os.getsid(os.getpid()))
--
To view, visit https://gerrit.ovirt.org/79733
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I826a89d4b63f0b4217173795638600a533a82f5c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 2 months
Change in vdsm[master]: move constants.SUPPORTED_BLOCKSIZE to its sole user
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: move constants.SUPPORTED_BLOCKSIZE to its sole user
......................................................................
move constants.SUPPORTED_BLOCKSIZE to its sole user
Change-Id: I2845bd782b2641accfa1b3bd27a6a47c5723ae06
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/constants.py.in
M lib/vdsm/storage/lvm.py
2 files changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/79731/1
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index 2d16d31..68c8b7a 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -55,7 +55,6 @@
# This is the domain version translation list
# DO NOT CHANGE OLD VALUES ONLY APPEND
DOMAIN_VERSIONS = (0, 2, 3, 4)
-SUPPORTED_BLOCKSIZE = (512,)
# This contains the domains versions that this VDSM
# accepts currently its all of the version but in the
diff --git a/lib/vdsm/storage/lvm.py b/lib/vdsm/storage/lvm.py
index 3421d20..7d26d9c 100644
--- a/lib/vdsm/storage/lvm.py
+++ b/lib/vdsm/storage/lvm.py
@@ -71,6 +71,8 @@
LV_ATTR = namedtuple("LV_ATTR", LV_ATTR_BITS)
Stub = namedtuple("Stub", "name, stale")
+SUPPORTED_BLOCKSIZE = (512,)
+
class Unreadable(Stub):
__slots__ = ()
@@ -1095,7 +1097,7 @@
pvBlkSize = _getpvblksize(pv)
logPvBlkSize, phyPvBlkSize = pvBlkSize
- if logPvBlkSize not in constants.SUPPORTED_BLOCKSIZE:
+ if logPvBlkSize not in SUPPORTED_BLOCKSIZE:
raise se.DeviceBlockSizeError(pvBlkSize)
if phyPvBlkSize < logPvBlkSize:
--
To view, visit https://gerrit.ovirt.org/79731
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2845bd782b2641accfa1b3bd27a6a47c5723ae06
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 2 months