Change in vdsm[master]: vmfakecon: optimize HostDeviceStub
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: vmfakecon: optimize HostDeviceStub
......................................................................
vmfakecon: optimize HostDeviceStub
HostDeviceStub processed the XML only to grab few pieces of
information. The process roughly went as follows:
str->xml (get few values)->str->xml.
We aim to remove the intermediate XML parsing, leaving much nicer
flow: str->xml. The optimization helps us further down the series when
working with large number of devices.
Change-Id: I034ffed83b17eeb4e6a1ec58361a95ea72afb1e8
Bug-Url: https://bugzilla.redhat.com/1398572
Signed-off-by: Martin Polednik <mpolednik(a)redhat.com>
---
M tests/vmfakecon.py
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Francesco Romani: Looks good to me, approved
Martin Polednik: Verified
--
To view, visit https://gerrit.ovirt.org/67514
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I034ffed83b17eeb4e6a1ec58361a95ea72afb1e8
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(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: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
6 years, 12 months
Change in vdsm[master]: Remove the usage of clientIF from GlusterApi
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: Remove the usage of clientIF from GlusterApi
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.ovirt.org/67660
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id08bb1ff6d988aa06aca993378f3eb96fd7270a2
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <rnachimu(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Ramesh N <rnachimu(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
6 years, 12 months
Change in vdsm[master]: rename method wrapApiMethod to _wrap_api_method
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: rename method wrapApiMethod to _wrap_api_method
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.ovirt.org/67665
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I53dd08eae8547831d02f37cc6178184b3589cc0b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <rnachimu(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Ramesh N <rnachimu(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
6 years, 12 months
Change in vdsm[master]: hostdev: use *c*ElementTree
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: hostdev: use *c*ElementTree
......................................................................
hostdev: use *c*ElementTree
cElementTree is *the* recommended ETree implementation on platforms
that support C. It delivers nice performance improvement over previous
implementation.
ElementTree:
time PYTHONPATH="../" NOSE_SLOW_TESTS=true ./run_tests.sh -s -m
test_3k_storage_devices hostdevTests.py
nose.config: INFO: Ignoring files matching ['^\\.', '^_',
'^setup\\.py$']
hostdevTests.HostdevPerformanceTests
test_3k_storage_devices OK
----------------------------------------------------------------------
Ran 1 test in 2.656s
OK
real 0m3.010s
user 0m2.951s
sys 0m0.060s
cElementTree:
time PYTHONPATH="../" NOSE_SLOW_TESTS=true ./run_tests.sh -s -m
test_3k_storage_devices hostdevTests.py
nose.config: INFO: Ignoring files matching ['^\\.', '^_',
'^setup\\.py$']
hostdevTests.HostdevPerformanceTests
test_3k_storage_devices OK
----------------------------------------------------------------------
Ran 1 test in 0.432s
OK
real 0m0.789s
user 0m0.730s
sys 0m0.060s
Change-Id: I580e3f1c30c4751f0299b6fbc2bd5eb6ed33132b
Bug-Url: https://bugzilla.redhat.com/1398572
Signed-off-by: Martin Polednik <mpolednik(a)redhat.com>
---
M lib/vdsm/hostdev.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins CI: Passed CI tests
Francesco Romani: Looks good to me, approved
Martin Polednik: Verified
--
To view, visit https://gerrit.ovirt.org/67515
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I580e3f1c30c4751f0299b6fbc2bd5eb6ed33132b
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(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: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
6 years, 12 months
Change in vdsm[master]: hostdev: add caching of device tree
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: hostdev: add caching of device tree
......................................................................
Patch Set 7:
(2 comments)
very partial
https://gerrit.ovirt.org/#/c/67457/7/lib/vdsm/hostdev.py
File lib/vdsm/hostdev.py:
Line 68: class UnsuitableSCSIDevice(Exception):
Line 69: pass
Line 70:
Line 71:
Line 72: class DeviceTreeCache(object):
I hope this is not going to be public
Line 73:
Line 74: def __init__(self, devices):
Line 75: self._parent_to_device_name = {}
Line 76: # Store a reference so we can look up the params
PS7, Line 407: ret[1]
this is very opaque. can you use a proper name?
--
To view, visit https://gerrit.ovirt.org/67457
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5b901fac8df23aed958fb9509008f9cfaee648c3
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(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: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal(a)redhat.com>
Gerrit-Reviewer: Yaniv Kaul <ykaul(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
6 years, 12 months
Change in vdsm[master]: hostdev: add test for massive number of devices
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: hostdev: add test for massive number of devices
......................................................................
Patch Set 7:
(1 comment)
https://gerrit.ovirt.org/#/c/67456/7//COMMIT_MSG
Commit Message:
Line 6:
Line 7: hostdev: add test for massive number of devices
Line 8:
Line 9: We have not really tested the most perf-wise fragile part of the code.
Line 10: We therefore add a test case which iterates over ~3k devices.
how much time does this test take, prior to you optimization? and how much later?
Line 11:
Line 12: Change-Id: If0f891dc8630d1dab971df228652f5d757db2e14
Line 13: Bug-Url: https://bugzilla.redhat.com/1398572
--
To view, visit https://gerrit.ovirt.org/67456
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If0f891dc8630d1dab971df228652f5d757db2e14
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(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: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
6 years, 12 months
Change in vdsm[master]: Remove the usage of clientIF from GlusterApi
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: Remove the usage of clientIF from GlusterApi
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
https://gerrit.ovirt.org/#/c/67660/1/lib/vdsm/rpc/bindingxmlrpc.py
File lib/vdsm/rpc/bindingxmlrpc.py:
Line 1210: (self.devicesGetVisibility, 'getDevicesVisibility'),
Line 1211: (self.sdm_create_volume, 'sdm_create_volume'))
Line 1212:
Line 1213:
Line 1214: def _wrap_api_method(f, cif):
this change should sit in a tny separate patch. sorry for not being clear about it.
Line 1215: def wrapper(*args, **kwargs):
Line 1216: start_time = utils.monotonic_time()
Line 1217: res = {}
Line 1218: try:
https://gerrit.ovirt.org/#/c/67660/1/vdsm/gluster/apiwrapper.py
File vdsm/gluster/apiwrapper.py:
Line 18: # Refer to the README and COPYING files for full details of the license
Line 19: #
Line 20: from __future__ import absolute_import
Line 21:
Line 22: from vdsm.gluster.api import GlusterApi, META_VOLUME
seems more related to the next patch in the series.
Line 23:
Line 24:
Line 25: class GlusterApiBase(object):
Line 26: ctorArgs = []
--
To view, visit https://gerrit.ovirt.org/67660
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id08bb1ff6d988aa06aca993378f3eb96fd7270a2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <rnachimu(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Ramesh N <rnachimu(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
6 years, 12 months
Change in vdsm[master]: client: document ConnectionError exception
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: client: document ConnectionError exception
......................................................................
client: document ConnectionError exception
ConnectionError exception was added to the client but
information regarding it wasn't added to the module
documentation.
Change-Id: I9a8f1034a4f453d1a59e1b0c50647a1700f58f3c
Signed-off-by: Irit Goihman <igoihman(a)redhat.com>
---
M lib/vdsm/client.py
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Piotr Kliczewski: Looks good to me, approved
Jenkins CI: Passed CI tests
Irit Goihman: Verified
--
To view, visit https://gerrit.ovirt.org/67638
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9a8f1034a4f453d1a59e1b0c50647a1700f58f3c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
6 years, 12 months
Change in vdsm[master]: py3: take Queue from six.moves
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: py3: take Queue from six.moves
......................................................................
py3: take Queue from six.moves
Affected modules are still not complient with Python 3, but this cleanup
is simple and takes us one tiny step forward.
Change-Id: I7c3e547b0d87de56bf65cccb633db5da7f63565f
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/storage_monitor_test.py
M vdsm/storage/resourceManager.py
M vdsm/storage/storage_mailbox.py
M vdsm/storage/threadPool.py
4 files changed, 12 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/66698/1
diff --git a/tests/storage_monitor_test.py b/tests/storage_monitor_test.py
index 8f72402..4ae2d29 100644
--- a/tests/storage_monitor_test.py
+++ b/tests/storage_monitor_test.py
@@ -18,12 +18,13 @@
# Refer to the README and COPYING files for full details of the license
#
-import Queue
import logging
import threading
import time
from contextlib import contextmanager
+
+from six.moves.queue import Queue, Empty
from vdsm.storage import exception as se
@@ -181,13 +182,13 @@
self.thread = thread
self.event = event
self.checker = checker
- self.queue = Queue.Queue()
+ self.queue = Queue()
self.thread.cycleCallback = self._callback
def wait_for_cycle(self):
try:
self.queue.get(True, CYCLE_TIMEOUT)
- except Queue.Empty:
+ except Empty:
raise RuntimeError("Timeout waiting for monitor cycle")
def _callback(self):
diff --git a/vdsm/storage/resourceManager.py b/vdsm/storage/resourceManager.py
index 20aa06c..413b936 100644
--- a/vdsm/storage/resourceManager.py
+++ b/vdsm/storage/resourceManager.py
@@ -25,7 +25,8 @@
from functools import partial
from contextlib import nested
from uuid import uuid4
-from Queue import Queue
+
+from six.moves.queue import Queue
from vdsm.logUtils import SimpleLogAdapter
from vdsm import concurrent
diff --git a/vdsm/storage/storage_mailbox.py b/vdsm/storage/storage_mailbox.py
index 0d240fe..4853285 100644
--- a/vdsm/storage/storage_mailbox.py
+++ b/vdsm/storage/storage_mailbox.py
@@ -22,11 +22,12 @@
import errno
import time
import threading
-import Queue
import struct
import logging
import uuid
+
+from six.moves.queue import Queue, Empty
from vdsm.config import config
from vdsm.storage import misc
@@ -185,7 +186,7 @@
self._poolID = str(poolID)
self._monitorInterval = monitorInterval
self._spmStorageDir = config.get('irs', 'repository')
- self._queue = Queue.Queue(-1)
+ self._queue = Queue(-1)
# *** IMPORTANT NOTE: The SPM's inbox is the HSMs' outbox and vice
# versa *** #
self._inbox = os.path.join(self._spmStorageDir, self._poolID,
@@ -455,7 +456,7 @@
self._handleMessage(message)
message = None
sendMail = True
- except Queue.Empty:
+ except Empty:
pass
if self._stop:
@@ -472,7 +473,7 @@
self._handleMessage(message)
message = None
sendMail = True
- except Queue.Empty:
+ except Empty:
empty = True
if self._flush:
diff --git a/vdsm/storage/threadPool.py b/vdsm/storage/threadPool.py
index e2ecf74..ae1d8b0 100644
--- a/vdsm/storage/threadPool.py
+++ b/vdsm/storage/threadPool.py
@@ -11,7 +11,7 @@
import logging
import threading
-from Queue import Queue, Empty
+from six.moves.queue import Queue, Empty
from time import sleep
from vdsm import concurrent
--
To view, visit https://gerrit.ovirt.org/66698
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c3e547b0d87de56bf65cccb633db5da7f63565f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 12 months
Change in vdsm[master]: rwtab.d: Remove vdsm entry
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: rwtab.d: Remove vdsm entry
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.ovirt.org/67620
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ife3193bcb48fa28d5e648c1b28d0a0b01de9206e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Leon Goldberg <leon.otium(a)gmail.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
6 years, 12 months