Change in vdsm[master]: move vdsm.constants.UUID_GLOB_PATTERN 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 vdsm.constants.UUID_GLOB_PATTERN to storage.constants
......................................................................
move vdsm.constants.UUID_GLOB_PATTERN to storage.constants
UUID_GLOB_PATTERN is used only by storage, and should be defined there
as well.
Change-Id: If50684c256ff3e732ea1f058fe7b48b9becd3ac6
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/constants.py.in
M lib/vdsm/storage/constants.py
M lib/vdsm/storage/fileSD.py
M lib/vdsm/storage/sd.py
M lib/vdsm/storage/sp.py
5 files changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/14/79714/1
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index 7ad3eb1..6be6b57 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -62,8 +62,6 @@
# future we might slice it (eg. tuple(DOMAIN_VERSION[1:]))
SUPPORTED_DOMAIN_VERSIONS = DOMAIN_VERSIONS
-UUID_GLOB_PATTERN = '*-*-*-*-*'
-
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 85fc536..d08f688 100644
--- a/lib/vdsm/storage/constants.py
+++ b/lib/vdsm/storage/constants.py
@@ -92,6 +92,8 @@
BLANK_UUID = "00000000-0000-0000-0000-000000000000"
+UUID_GLOB_PATTERN = '*-*-*-*-*'
+
def fmt2str(format):
return FMT2STR[format]
diff --git a/lib/vdsm/storage/fileSD.py b/lib/vdsm/storage/fileSD.py
index 9964f65..b9160d0 100644
--- a/lib/vdsm/storage/fileSD.py
+++ b/lib/vdsm/storage/fileSD.py
@@ -41,7 +41,7 @@
from vdsm import constants
from vdsm.utils import stripNewLines
-from vdsm.storage.constants import LEASE_FILEEXT
+from vdsm.storage.constants import LEASE_FILEEXT, UUID_GLOB_PATTERN
from vdsm import supervdsm
REMOTE_PATH = "REMOTE_PATH"
@@ -329,7 +329,7 @@
"""
# Get Volumes of an image
pattern = os.path.join(self.mountpoint, self.sdUUID, sd.DOMAIN_IMAGES,
- constants.UUID_GLOB_PATTERN)
+ UUID_GLOB_PATTERN)
files = self.oop.glob.glob(pattern)
images = set()
for i in files:
@@ -792,7 +792,7 @@
# possibleDomain that we pass to glob.
metaFiles = oop.getProcessPool(possibleDomain).glob.glob(
os.path.join(glob_escape(possibleDomain),
- constants.UUID_GLOB_PATTERN,
+ UUID_GLOB_PATTERN,
sd.DOMAIN_META_DATA))
for metaFile in metaFiles:
diff --git a/lib/vdsm/storage/sd.py b/lib/vdsm/storage/sd.py
index b121ef9..d1964ba 100644
--- a/lib/vdsm/storage/sd.py
+++ b/lib/vdsm/storage/sd.py
@@ -915,7 +915,7 @@
def getVMsList(self):
vmsPath = self.getVMsDir()
# find out VMs list
- VM_PATTERN = os.path.join(vmsPath, constants.UUID_GLOB_PATTERN)
+ VM_PATTERN = os.path.join(vmsPath, sc.UUID_GLOB_PATTERN)
vms = self.oop.glob.glob(VM_PATTERN)
vmList = [os.path.basename(i) for i in vms]
self.log.info("vmList=%s", str(vmList))
diff --git a/lib/vdsm/storage/sp.py b/lib/vdsm/storage/sp.py
index e39cbc3..e63e826 100644
--- a/lib/vdsm/storage/sp.py
+++ b/lib/vdsm/storage/sp.py
@@ -1278,7 +1278,7 @@
fileUtils.createdir(self.poolPath)
# Find out all domains for future cleanup
- domainpat = os.path.join(self.poolPath, constants.UUID_GLOB_PATTERN)
+ domainpat = os.path.join(self.poolPath, sc.UUID_GLOB_PATTERN)
oldLinks = set(iglob(domainpat))
# We should not rebuild non-active domains, because
--
To view, visit https://gerrit.ovirt.org/79714
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If50684c256ff3e732ea1f058fe7b48b9becd3ac6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 9 months
Change in vdsm[master]: hook: checkimages: define GiB properly
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: hook: checkimages: define GiB properly
......................................................................
hook: checkimages: define GiB properly
The constant is called GIB, but the value was that of the plain decimal
GB.
Change-Id: I96085ece34026dd67158a320b8dff3f9f73be927
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm_hooks/checkimages/before_vm_start.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/30/79730/1
diff --git a/vdsm_hooks/checkimages/before_vm_start.py b/vdsm_hooks/checkimages/before_vm_start.py
index e024dd3..31b123d 100755
--- a/vdsm_hooks/checkimages/before_vm_start.py
+++ b/vdsm_hooks/checkimages/before_vm_start.py
@@ -10,7 +10,7 @@
BLKGETSIZE64 = 0x80081272 # Obtain device size in bytes
FORMAT = 'L'
TIMEPERGIB = 0.02 # Approximate qemu-img check time (in seconds) to check 1GiB
-GIB = 10 ** 9 # GiB
+GIB = 2 ** 30 # GiB
'''
checkimages vdsm hook
--
To view, visit https://gerrit.ovirt.org/79730
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I96085ece34026dd67158a320b8dff3f9f73be927
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 9 months
Change in vdsm[master]: move constants.EXT_BRCTL to its sole current user
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: move constants.EXT_BRCTL to its sole current user
......................................................................
move constants.EXT_BRCTL to its sole current user
EXT_BRCTL is not going to move anytime soon from /usr/sbin/brctl. This
patch defines this constant inside its sole current user, dummybr.
Change-Id: Icaaf576d5d3456935fa848c04bd65517d09b37ed
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M configure.ac
M lib/vdsm/constants.py.in
M lib/vdsm/tool/dummybr.py
3 files changed, 4 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/79717/1
diff --git a/configure.ac b/configure.ac
index 41c7c10..df28741 100644
--- a/configure.ac
+++ b/configure.ac
@@ -323,7 +323,6 @@
AX_PYTHON_MODULE([six], [fatal], python2)
# External programs (sorted, please keep in order)
-AC_PATH_PROG([BRCTL_PATH], [brctl], [/usr/sbin/brctl])
AC_PATH_PROG([CAT_PATH], [cat], [/bin/cat])
AC_PATH_PROG([CHCON_PATH], [chcon], [/bin/chcon])
AC_PATH_PROG([CHMOD_PATH], [chmod], [/bin/chmod])
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index b6193f6..a0cbe86 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -90,8 +90,6 @@
#
# External programs (sorted, please keep in order).
#
-EXT_BRCTL = '@BRCTL_PATH@'
-
EXT_CHOWN = '@CHOWN_PATH@'
EXT_DD = '@DD_PATH@'
diff --git a/lib/vdsm/tool/dummybr.py b/lib/vdsm/tool/dummybr.py
index 4356fe1..84a1af7 100644
--- a/lib/vdsm/tool/dummybr.py
+++ b/lib/vdsm/tool/dummybr.py
@@ -22,12 +22,14 @@
import os
from vdsm.network.api import DUMMY_BRIDGE
-from .. import libvirtconnection, commands, constants
+from .. import libvirtconnection, commands
from . import expose, ExtraArgsError
+
+EXT_BRCTL = '/usr/sbin/brctl'
def createEphemeralBridge(bridgeName):
- rc, out, err = commands.execCmd([constants.EXT_BRCTL, 'addbr', bridgeName])
+ rc, out, err = commands.execCmd([EXT_BRCTL, 'addbr', bridgeName])
if rc != 0:
raise EnvironmentError(
'Failed to create ephemeral dummy bridge. Err: %s' % err
--
To view, visit https://gerrit.ovirt.org/79717
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icaaf576d5d3456935fa848c04bd65517d09b37ed
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 9 months
Change in vdsm[master]: tool: clear networks configured by VDSM
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: tool: clear networks configured by VDSM
......................................................................
Patch Set 4:
(2 comments)
https://gerrit.ovirt.org/#/c/79495/4//COMMIT_MSG
Commit Message:
PS4, Line 10: but default route
> So if the management is not really with the default route, then we loose th
ack for a compulsory argument. When it is not supplied by the user, the error message prints the default route network as a suggestion.
https://gerrit.ovirt.org/#/c/79495/4/lib/vdsm/tool/network.py
File lib/vdsm/tool/network.py:
PS4, Line 104: net_api.network_caps()
> Why can't you use just the caps? This will reduce the need to depend on the
we'd like to keep the management network, but remove its bridge in case it exists; if we do not use KernelConfig, we'd have to reimplement some of it here.
--
To view, visit https://gerrit.ovirt.org/79495
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I63702da4dd1c5a0328797f524734813ef251bdb6
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek(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: Petr Horacek <phoracek(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
6 years, 9 months
Change in vdsm[master]: password: Move to vdsm.common
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: password: Move to vdsm.common
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.ovirt.org/79700
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If3e996c02acc76e3bd15c3aa656f7341c82c1e6f
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
6 years, 9 months
Change in vdsm[master]: hooking: move to lib
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: hooking: move to lib
......................................................................
Patch Set 7:
(2 comments)
https://gerrit.ovirt.org/#/c/79638/7/tests/run_tests_local.sh.in
File tests/run_tests_local.sh.in:
Line 23
Line 24
Line 25
Line 26
Line 27
why is `client` related and removed?
https://gerrit.ovirt.org/#/c/79638/7/vdsm.spec.in
File vdsm.spec.in:
PS7, Line 732: PYLIBDIR
> I do not like it but if we want to have this module in lib/vdsm I do not se
I'd keep it completely out of the constants.py junkyard. Howe about taking
os.path.dirname(vdsm.hook.__file__)
whereever the path is needed? (frankly, I think that there's only a single user, in hooks.py)
--
To view, visit https://gerrit.ovirt.org/79638
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If2f1581d75cfb33868af41d1b116f56af89801a5
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(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, 9 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 2:
(1 comment)
https://gerrit.ovirt.org/#/c/79664/2//COMMIT_MSG
Commit Message:
Line 9: M2crypto uses the same name scheme as openssl which differs from ssl
Line 10: module. SSL_OP_NO_TLSv1_1 is not available on some of m2c versions.
Line 11:
Line 12:
Line 13: Label: ovirt-4.1-only
> m2c was removed from master
i know. i would write it here
Line 14: Bug-Url: https://bugzilla.redhat.com/1473344
Line 15: Change-Id: I6c05bddfba94d85e2c48122b6fd56d8f336d01f5
--
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: 2
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, 9 months
Change in vdsm[master]: ssl: handle handshake errors
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has posted comments on this change.
Change subject: ssl: handle handshake errors
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
https://gerrit.ovirt.org/#/c/79668/1/lib/vdsm/sslutils.py
File lib/vdsm/sslutils.py:
Line 187: self._handshake(dispatcher)
Line 188: except socket.error:
Line 189: self.log.error("Handshake failed")
Line 190: dispatcher.socket.close()
Line 191: return
seems like _handshake itself takes care of exceptions.. if you need to handle socker.error somewhere its there and not here
Line 192: else:
Line 193: if config.getboolean('vars', 'verify_client_cert'):
Line 194: if not self._verify_host(dispatcher.socket.getpeercert(),
Line 195: dispatcher.socket.getpeername()[0]):
--
To view, visit https://gerrit.ovirt.org/79668
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I99cfa35e608f429640455c35495be1783854e3da
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(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, 9 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 2: Code-Review-1
(1 comment)
https://gerrit.ovirt.org/#/c/79664/2//COMMIT_MSG
Commit Message:
Line 9: M2crypto uses the same name scheme as openssl which differs from ssl
Line 10: module. SSL_OP_NO_TLSv1_1 is not available on some of m2c versions.
Line 11:
Line 12:
Line 13: Label: ovirt-4.1-only
why is it 4.1 only?
Line 14: Bug-Url: https://bugzilla.redhat.com/1473344
Line 15: Change-Id: I6c05bddfba94d85e2c48122b6fd56d8f336d01f5
--
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: 2
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, 9 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 2:
(2 comments)
https://gerrit.ovirt.org/#/c/79664/2/lib/vdsm/config.py.in
File lib/vdsm/config.py.in:
Line 237: ('ssl_excludes', '',
Line 238: 'Comma separated protocol values as defined in '
Line 239: 'https://docs.python.org/2/library/ssl.html. '
Line 240: 'e.g. for ssl OP_NO_TLSv1, OP_NO_TLSv1_1 '
Line 241: ' for m2crypto SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1 '
funny.. just except both and do the conversion yourself based on the implementation you use. it will make the user's life easier
Line 242: 'By default tlv1, tlsv1.1 and tlsv1.2 are '
Line 243: 'enabled.'),
Line 244:
Line 245: ('connection_stats_timeout', '3600',
https://gerrit.ovirt.org/#/c/79664/2/lib/vdsm/m2cutils.py
File lib/vdsm/m2cutils.py:
Line 336: # not all m2crypto provide this constant
Line 337: excludes |= 268435456
Line 338: else:
Line 339: excludes |= getattr(m2, no_protocol.strip())
Line 340:
you are calling no_protocol.strip() in the condition, so the attr probably exists.. what constant m2crypto is not provided?
--
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: 2
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, 9 months