Change in vdsm[master]: Upgrade test - add more old repos to upgrade from
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Upgrade test - add more old repos to upgrade from
......................................................................
Upgrade test - add more old repos to upgrade from
This patch adds master snapshot repo to the test.
Change-Id: I62124b45b8084c49c678e03287aa71f8eabb7f70
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M tests/functional/upgrade_vdsm_test.py
1 file changed, 9 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/67788/1
diff --git a/tests/functional/upgrade_vdsm_test.py b/tests/functional/upgrade_vdsm_test.py
index 792acf7..6d7433c 100644
--- a/tests/functional/upgrade_vdsm_test.py
+++ b/tests/functional/upgrade_vdsm_test.py
@@ -21,8 +21,10 @@
from vdsm.tool.service import service_start, service_status, service_stop
from testlib import VdsmTestCase
+from testlib import permutations, expandPermutations
-el7_ovirt36_repo = 'http://resources.ovirt.org/pub/ovirt-3.6/rpm/el7/'
+_EL7_OVIRT36_REPO_URL = 'http://resources.ovirt.org/pub/ovirt-3.6/rpm/el7/'
+_EL7_MASTER_REPO_URL = 'http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/el7/'
def run_command(command):
@@ -56,19 +58,21 @@
run_command(['yum', 'install', '-y', 'vdsm'])
service_start('vdsmd')
- def service_up_test(self):
+ @permutations((_EL7_MASTER_REPO_URL, _EL7_OVIRT36_REPO_URL))
+ def service_up_test(self, old_repo):
service_start('vdsmd')
vdsm_version = run_command(['rpm', '-q', 'vdsm'])
- downgrade_vdsm(el7_ovirt36_repo)
+ downgrade_vdsm(old_repo)
upgrade_vdsm()
self.assertEqual(run_command(['rpm', '-q', 'vdsm']), vdsm_version)
self.assertEqual(service_status('vdsmd'), 0)
- def service_down_test(self):
+ @permutations((_EL7_MASTER_REPO_URL, _EL7_OVIRT36_REPO_URL))
+ def service_down_test(self, old_repo):
service_stop('vdsmd')
vdsm_version = run_command(['rpm', '-q', 'vdsm'])
- downgrade_vdsm(el7_ovirt36_repo)
+ downgrade_vdsm(old_repo)
upgrade_vdsm()
self.assertEqual(run_command(['rpm', '-q', 'vdsm']), vdsm_version)
--
To view, visit https://gerrit.ovirt.org/67788
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I62124b45b8084c49c678e03287aa71f8eabb7f70
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
6 years, 4 months
Change in vdsm[master]: storage: move task and taskManager to lib
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: storage: move task and taskManager to lib
......................................................................
storage: move task and taskManager to lib
Change-Id: I97890c2600ffd8bfef7b51fdc4457e5b92459164
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/storage/Makefile.am
R lib/vdsm/storage/task.py
R lib/vdsm/storage/taskManager.py
M vdsm.spec.in
M vdsm/storage/Makefile.am
M vdsm/storage/blockVolume.py
M vdsm/storage/dispatcher.py
M vdsm/storage/fileVolume.py
M vdsm/storage/hsm.py
M vdsm/storage/image.py
M vdsm/storage/storage_mailbox.py
M vdsm/storage/volume.py
12 files changed, 14 insertions(+), 12 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/29/69329/1
diff --git a/lib/vdsm/storage/Makefile.am b/lib/vdsm/storage/Makefile.am
index b6efac5..4cf1b33 100644
--- a/lib/vdsm/storage/Makefile.am
+++ b/lib/vdsm/storage/Makefile.am
@@ -49,6 +49,8 @@
resourceManager.py \
rwlock.py \
securable.py \
+ task.py \
+ taskManager.py \
threadPool.py \
threadlocal.py \
types.py \
diff --git a/vdsm/storage/task.py b/lib/vdsm/storage/task.py
similarity index 99%
rename from vdsm/storage/task.py
rename to lib/vdsm/storage/task.py
index 20fa809..b23fd07 100644
--- a/vdsm/storage/task.py
+++ b/lib/vdsm/storage/task.py
@@ -45,6 +45,7 @@
recovered (loaded) from its persisted store.
'''
+from __future__ import absolute_import
import os
import logging
import threading
diff --git a/vdsm/storage/taskManager.py b/lib/vdsm/storage/taskManager.py
similarity index 98%
rename from vdsm/storage/taskManager.py
rename to lib/vdsm/storage/taskManager.py
index 3a67370..2c5736d 100644
--- a/vdsm/storage/taskManager.py
+++ b/lib/vdsm/storage/taskManager.py
@@ -18,6 +18,7 @@
# Refer to the README and COPYING files for full details of the license
#
+from __future__ import absolute_import
import os
import logging
import threading
@@ -26,7 +27,7 @@
from vdsm.storage import exception as se
from vdsm.storage.threadPool import ThreadPool
-from task import Task, Job, TaskCleanType
+from .task import Task, Job, TaskCleanType
class TaskManager:
diff --git a/vdsm.spec.in b/vdsm.spec.in
index db979ad..dfa33f3 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -952,8 +952,6 @@
%{_datadir}/%{vdsm_name}/storage/spbackends.py*
%{_datadir}/%{vdsm_name}/storage/storage_mailbox.py*
%{_datadir}/%{vdsm_name}/storage/storageServer.py*
-%{_datadir}/%{vdsm_name}/storage/taskManager.py*
-%{_datadir}/%{vdsm_name}/storage/task.py*
%{_datadir}/%{vdsm_name}/storage/volume.py*
%{_datadir}/%{vdsm_name}/storage/imageRepository/__init__.py*
%{_datadir}/%{vdsm_name}/storage/imageRepository/formatConverter.py*
@@ -1211,6 +1209,8 @@
%{python_sitelib}/%{vdsm_name}/storage/resourceManager.py*
%{python_sitelib}/%{vdsm_name}/storage/rwlock.py*
%{python_sitelib}/%{vdsm_name}/storage/securable.py*
+%{python_sitelib}/%{vdsm_name}/storage/task.py*
+%{python_sitelib}/%{vdsm_name}/storage/taskManager.py*
%{python_sitelib}/%{vdsm_name}/storage/threadPool.py*
%{python_sitelib}/%{vdsm_name}/storage/threadlocal.py*
%{python_sitelib}/%{vdsm_name}/storage/types.py*
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index 8ebecbb..edcd55f 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -45,8 +45,6 @@
spbackends.py \
storage_mailbox.py \
storageServer.py \
- taskManager.py \
- task.py \
volume.py
dist_vdsmexec_SCRIPTS = \
diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py
index edb4c7a..c16da71 100644
--- a/vdsm/storage/blockVolume.py
+++ b/vdsm/storage/blockVolume.py
@@ -34,6 +34,7 @@
from vdsm.storage import lvm
from vdsm.storage import misc
from vdsm.storage import resourceManager as rm
+from vdsm.storage import task
from vdsm.storage.misc import deprecated
from vdsm.storage.threadlocal import vars
from vdsm.storage.volumemetadata import VolumeMetadata
@@ -43,7 +44,6 @@
import image
import sd
import blockSD
-import task
from sdc import sdCache
diff --git a/vdsm/storage/dispatcher.py b/vdsm/storage/dispatcher.py
index ab26986..6f037bd 100644
--- a/vdsm/storage/dispatcher.py
+++ b/vdsm/storage/dispatcher.py
@@ -23,8 +23,8 @@
from vdsm.config import config
from vdsm.storage import exception as se
+from vdsm.storage import task
-import task
_EXPORTED_ATTRIBUTE = "__dispatcher_exported__"
diff --git a/vdsm/storage/fileVolume.py b/vdsm/storage/fileVolume.py
index 4533b07..0c3fb02 100644
--- a/vdsm/storage/fileVolume.py
+++ b/vdsm/storage/fileVolume.py
@@ -29,6 +29,7 @@
from vdsm.storage import exception as se
from vdsm.storage import misc
from vdsm.storage import outOfProcess as oop
+from vdsm.storage import task
from vdsm.storage.misc import deprecated
from vdsm.storage.threadlocal import vars
from vdsm.storage.volumemetadata import VolumeMetadata
@@ -38,7 +39,6 @@
import image
import sd
import fileSD
-import task
META_FILEEXT = ".meta"
LEASE_FILEOFFSET = 0
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 799985f..4299801 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -57,6 +57,7 @@
from vdsm.storage import multipath
from vdsm.storage import outOfProcess as oop
from vdsm.storage import resourceManager as rm
+from vdsm.storage import taskManager
from vdsm.storage import types
from vdsm.storage.constants import STORAGE
from vdsm.storage.constants import SECTOR_SIZE
@@ -76,7 +77,6 @@
from sdc import sdCache
import image
import merge
-import taskManager
import dispatcher
import storageServer
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index 2720c04..67b29a0 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -34,13 +34,13 @@
from vdsm.storage import imageSharing
from vdsm.storage import misc
from vdsm.storage import resourceManager as rm
+from vdsm.storage import task
from vdsm.storage import workarounds
from vdsm.storage.threadlocal import vars
from sdc import sdCache
import sd
from vdsm.common.exception import ActionStopped
-import task
log = logging.getLogger('storage.Image')
diff --git a/vdsm/storage/storage_mailbox.py b/vdsm/storage/storage_mailbox.py
index 9f855f6..6a227bf 100644
--- a/vdsm/storage/storage_mailbox.py
+++ b/vdsm/storage/storage_mailbox.py
@@ -31,10 +31,10 @@
from vdsm.config import config
from vdsm.storage import misc
+from vdsm.storage import task
from vdsm.storage.exception import InvalidParameterException
from vdsm.storage.threadPool import ThreadPool
-import task
from vdsm import concurrent
from vdsm import constants
diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index 53020f1..d428719 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -32,13 +32,13 @@
from vdsm.storage import guarded
from vdsm.storage import misc
from vdsm.storage import resourceManager as rm
+from vdsm.storage import task
from vdsm.storage.misc import deprecated
from vdsm.storage.threadlocal import vars
from vdsm.storage.volumemetadata import VolumeMetadata
import sd
from sdc import sdCache
-import task
DOMAIN_MNT_POINT = 'mnt'
--
To view, visit https://gerrit.ovirt.org/69329
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I97890c2600ffd8bfef7b51fdc4457e5b92459164
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 4 months
Change in vdsm[master]: storage: move lvm.py to lib
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: storage: move lvm.py to lib
......................................................................
storage: move lvm.py to lib
Change-Id: I9d682bc48be3f73b8275ef89ff9abc19160e813a
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/storage/Makefile.am
R lib/vdsm/storage/lvm.py
M tests/storage_blocksd_test.py
M tests/storage_fakelib_test.py
M tests/storage_lvm_test.py
M tests/storagefakelib.py
M vdsm.spec.in
M vdsm/storage/Makefile.am
M vdsm/storage/blockSD.py
M vdsm/storage/blockVolume.py
M vdsm/storage/hsm.py
M vdsm/storage/resourceFactories.py
M vdsm/storage/resourceManager.py
M vdsm/storage/sdc.py
M vdsm/storage/sdm/volume_artifacts.py
15 files changed, 16 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/69327/1
diff --git a/lib/vdsm/storage/Makefile.am b/lib/vdsm/storage/Makefile.am
index 43dca3a..4780958 100644
--- a/lib/vdsm/storage/Makefile.am
+++ b/lib/vdsm/storage/Makefile.am
@@ -40,6 +40,7 @@
imagetickets.py \
iscsi.py \
iscsiadm.py \
+ merge.py \
misc.py \
mount.py \
multipath.py \
diff --git a/vdsm/storage/lvm.py b/lib/vdsm/storage/lvm.py
similarity index 99%
rename from vdsm/storage/lvm.py
rename to lib/vdsm/storage/lvm.py
index dc4a39d..48cea44 100644
--- a/vdsm/storage/lvm.py
+++ b/lib/vdsm/storage/lvm.py
@@ -24,6 +24,8 @@
Incapsulates the actual LVM mechanics.
"""
+from __future__ import absolute_import
+
import errno
import os
diff --git a/tests/storage_blocksd_test.py b/tests/storage_blocksd_test.py
index a8bf4d0..f0b0e29 100644
--- a/tests/storage_blocksd_test.py
+++ b/tests/storage_blocksd_test.py
@@ -26,7 +26,7 @@
from testlib import VdsmTestCase as TestCaseBase
from storage import blockSD
-from storage import lvm
+from vdsm.storage import lvm
from vdsm import constants
# Make it easy to test the values we care about
diff --git a/tests/storage_fakelib_test.py b/tests/storage_fakelib_test.py
index 3fb2952..cb5868f 100644
--- a/tests/storage_fakelib_test.py
+++ b/tests/storage_fakelib_test.py
@@ -23,6 +23,7 @@
from vdsm import utils
from vdsm.storage import exception as se
from vdsm.storage import constants as sc
+from vdsm.storage import lvm as real_lvm
from testlib import VdsmTestCase, namedTemporaryDir
from testlib import permutations, expandPermutations
@@ -33,7 +34,6 @@
from storagetestlib import FakeSD
from storage import blockSD
-from storage import lvm as real_lvm
MB = 1024 ** 2
diff --git a/tests/storage_lvm_test.py b/tests/storage_lvm_test.py
index 6792266..fba075f 100644
--- a/tests/storage_lvm_test.py
+++ b/tests/storage_lvm_test.py
@@ -21,7 +21,7 @@
from testlib import VdsmTestCase as TestCaseBase
-import storage.lvm as lvm
+import vdsm.storage.lvm as lvm
class LvmTests(TestCaseBase):
diff --git a/tests/storagefakelib.py b/tests/storagefakelib.py
index d337a6a..3ceac84 100644
--- a/tests/storagefakelib.py
+++ b/tests/storagefakelib.py
@@ -26,12 +26,11 @@
from testlib import make_file, recorded
from vdsm.storage import exception as se
+from vdsm.storage import lvm as real_lvm
from vdsm.storage.constants import VG_EXTENT_SIZE_MB
from vdsm import utils
-from storage import lvm as real_lvm
from storage import resourceManager as rm
-
class FakeLVM(object):
# We pretend all PVs are 10G in size
diff --git a/vdsm.spec.in b/vdsm.spec.in
index eef5a4f..2d501fa 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -943,7 +943,6 @@
%{_datadir}/%{vdsm_name}/storage/image.py*
%{_datadir}/%{vdsm_name}/storage/localFsSD.py*
%{_datadir}/%{vdsm_name}/storage/lvm.env
-%{_datadir}/%{vdsm_name}/storage/lvm.py*
%{_datadir}/%{vdsm_name}/storage/merge.py*
%{_datadir}/%{vdsm_name}/storage/nfsSD.py*
%{_datadir}/%{vdsm_name}/storage/resourceFactories.py*
@@ -1204,6 +1203,7 @@
%{python_sitelib}/%{vdsm_name}/storage/imagetickets.py*
%{python_sitelib}/%{vdsm_name}/storage/iscsi.py*
%{python_sitelib}/%{vdsm_name}/storage/iscsiadm.py*
+%{python_sitelib}/%{vdsm_name}/storage/merge.py*
%{python_sitelib}/%{vdsm_name}/storage/misc.py*
%{python_sitelib}/%{vdsm_name}/storage/mount.py*
%{python_sitelib}/%{vdsm_name}/storage/multipath.py*
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index a71a33b..3f39035 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -35,7 +35,6 @@
hsm.py \
image.py \
localFsSD.py \
- lvm.py \
merge.py \
monitor.py \
nfsSD.py \
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 21a83f0..2dc4fc1 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -47,6 +47,7 @@
from vdsm.storage import exception as se
from vdsm.storage import fileUtils
from vdsm.storage import iscsi
+from vdsm.storage import lvm
from vdsm.storage import misc
from vdsm.storage import mount
from vdsm.storage import multipath
@@ -56,7 +57,6 @@
import sd
from sdm import volume_artifacts
-import lvm
import blockVolume
import resourceFactories
from storage_mailbox import MAILBOX_SIZE
diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py
index 2098dda..2bada04 100644
--- a/vdsm/storage/blockVolume.py
+++ b/vdsm/storage/blockVolume.py
@@ -31,6 +31,7 @@
from vdsm.storage import constants as sc
from vdsm.storage import directio
from vdsm.storage import exception as se
+from vdsm.storage import lvm
from vdsm.storage import misc
from vdsm.storage.misc import deprecated
from vdsm.storage.threadlocal import vars
@@ -42,7 +43,6 @@
import sd
import blockSD
import task
-import lvm
import resourceManager as rm
from sdc import sdCache
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 695af5e..faa49b1 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -51,6 +51,7 @@
from vdsm.storage import fileUtils
from vdsm.storage import imagetickets
from vdsm.storage import iscsi
+from vdsm.storage import lvm
from vdsm.storage import misc
from vdsm.storage import mount
from vdsm.storage import multipath
@@ -71,7 +72,6 @@
import nfsSD
import glusterSD
import localFsSD
-import lvm
from sdc import sdCache
import image
import merge
diff --git a/vdsm/storage/resourceFactories.py b/vdsm/storage/resourceFactories.py
index 4126db8..2bb3c02 100644
--- a/vdsm/storage/resourceFactories.py
+++ b/vdsm/storage/resourceFactories.py
@@ -23,9 +23,9 @@
from vdsm.config import config
from vdsm.storage import constants as sc
from vdsm.storage import exception as se
+from vdsm.storage import lvm
import logging
-import lvm
import resourceManager as rm
from sdc import sdCache
import sd
diff --git a/vdsm/storage/resourceManager.py b/vdsm/storage/resourceManager.py
index 0576c09..140fde5 100644
--- a/vdsm/storage/resourceManager.py
+++ b/vdsm/storage/resourceManager.py
@@ -17,6 +17,7 @@
#
# Refer to the README and COPYING files for full details of the license
#
+from __future__ import absolute_import
import threading
import logging
diff --git a/vdsm/storage/sdc.py b/vdsm/storage/sdc.py
index 7fa13ea..7583d1d 100644
--- a/vdsm/storage/sdc.py
+++ b/vdsm/storage/sdc.py
@@ -27,10 +27,10 @@
from vdsm.config import config
from vdsm.storage import exception as se
+from vdsm.storage import lvm
from vdsm.storage import misc
from vdsm.storage import multipath
-import lvm
# Default cache age until forcibly refreshed
DEFAULT_REFRESH_INTERVAL = 300
diff --git a/vdsm/storage/sdm/volume_artifacts.py b/vdsm/storage/sdm/volume_artifacts.py
index 1c1ebde..6d2f041 100644
--- a/vdsm/storage/sdm/volume_artifacts.py
+++ b/vdsm/storage/sdm/volume_artifacts.py
@@ -55,9 +55,10 @@
from vdsm import qemuimg
from vdsm.storage import constants as sc
from vdsm.storage import exception as se
+from vdsm.storage import lvm
from vdsm.storage.volumemetadata import VolumeMetadata
-from storage import image, lvm
+from storage import image
class VolumeArtifacts(object):
--
To view, visit https://gerrit.ovirt.org/69327
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d682bc48be3f73b8275ef89ff9abc19160e813a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 4 months
Change in vdsm[master]: storage: move resourceManager to lib
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: storage: move resourceManager to lib
......................................................................
storage: move resourceManager to lib
Change-Id: I2546cf1b88f57362c94b817e2bc5cfca2db17a73
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/storage/Makefile.am
R lib/vdsm/storage/resourceManager.py
M tests/storage_merge_test.py
M tests/storage_resourcemanager_test.py
M tests/storage_sdm_copy_data_test.py
M tests/storage_sdm_create_volume_test.py
M tests/storage_sdm_merge_test.py
M tests/storage_volume_test.py
M tests/storagefakelib.py
M vdsm.spec.in
M vdsm/storage/Makefile.am
M vdsm/storage/blockSD.py
M vdsm/storage/blockVolume.py
M vdsm/storage/hsm.py
M vdsm/storage/image.py
M vdsm/storage/merge.py
M vdsm/storage/resourceFactories.py
M vdsm/storage/sd.py
M vdsm/storage/sdm/api/copy_data.py
M vdsm/storage/sdm/api/create_volume.py
M vdsm/storage/sdm/api/move_device.py
M vdsm/storage/sdm/api/reduce_domain.py
M vdsm/storage/sp.py
M vdsm/storage/task.py
M vdsm/storage/volume.py
25 files changed, 23 insertions(+), 23 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/28/69328/1
diff --git a/lib/vdsm/storage/Makefile.am b/lib/vdsm/storage/Makefile.am
index 4780958..b6efac5 100644
--- a/lib/vdsm/storage/Makefile.am
+++ b/lib/vdsm/storage/Makefile.am
@@ -46,6 +46,7 @@
multipath.py \
outOfProcess.py \
persistent.py \
+ resourceManager.py \
rwlock.py \
securable.py \
threadPool.py \
diff --git a/vdsm/storage/resourceManager.py b/lib/vdsm/storage/resourceManager.py
similarity index 100%
rename from vdsm/storage/resourceManager.py
rename to lib/vdsm/storage/resourceManager.py
diff --git a/tests/storage_merge_test.py b/tests/storage_merge_test.py
index 0015e24..1035ae1 100644
--- a/tests/storage_merge_test.py
+++ b/tests/storage_merge_test.py
@@ -37,12 +37,12 @@
from vdsm.storage import constants as sc
from vdsm.storage import exception as se
from vdsm.storage import guarded
+from vdsm.storage import resourceManager
from storage import blockVolume
from storage import fileVolume
from storage import merge
from storage import image
-from storage import resourceManager
from storage import sd
from storage import volume
diff --git a/tests/storage_resourcemanager_test.py b/tests/storage_resourcemanager_test.py
index ea29e70..ff6fdee 100644
--- a/tests/storage_resourcemanager_test.py
+++ b/tests/storage_resourcemanager_test.py
@@ -26,7 +26,7 @@
import types
from resource import getrlimit, RLIMIT_NPROC
-from storage import resourceManager as rm
+from vdsm.storage import resourceManager as rm
from monkeypatch import MonkeyPatch
from storagefakelib import FakeResourceManager
diff --git a/tests/storage_sdm_copy_data_test.py b/tests/storage_sdm_copy_data_test.py
index adc46c7..bda1f72 100644
--- a/tests/storage_sdm_copy_data_test.py
+++ b/tests/storage_sdm_copy_data_test.py
@@ -41,10 +41,10 @@
from vdsm.storage import constants as sc
from vdsm.storage import exception as se
from vdsm.storage import guarded
+from vdsm.storage import resourceManager
from vdsm.storage import workarounds
from storage import blockVolume, sd, volume
-from storage import resourceManager
import storage.sdm.api.copy_data
diff --git a/tests/storage_sdm_create_volume_test.py b/tests/storage_sdm_create_volume_test.py
index 0fb7e4b..e4e1f71 100644
--- a/tests/storage_sdm_create_volume_test.py
+++ b/tests/storage_sdm_create_volume_test.py
@@ -31,9 +31,9 @@
from vdsm import jobs
from vdsm.storage import constants as sc
from vdsm.storage import exception as se
+from vdsm.storage import resourceManager as rm
from storage import fileVolume, sd
-from storage import resourceManager as rm
import storage.sdm.api.create_volume
diff --git a/tests/storage_sdm_merge_test.py b/tests/storage_sdm_merge_test.py
index b17e609..52e486f 100644
--- a/tests/storage_sdm_merge_test.py
+++ b/tests/storage_sdm_merge_test.py
@@ -37,11 +37,11 @@
from vdsm.storage import constants as sc
from vdsm.storage import exception as se
from vdsm.storage import guarded
+from vdsm.storage import resourceManager
from storage import image
from storage import merge
from storage import blockVolume, sd, volume
-from storage import resourceManager
import storage.sdm.api.merge
diff --git a/tests/storage_volume_test.py b/tests/storage_volume_test.py
index 3c8f6e0..73a921b 100644
--- a/tests/storage_volume_test.py
+++ b/tests/storage_volume_test.py
@@ -32,8 +32,8 @@
from vdsm.storage import constants as sc
from vdsm.storage import exception as se
+from vdsm.storage import resourceManager as rm
-from storage import resourceManager as rm
from storage import sd
from storage import volume
diff --git a/tests/storagefakelib.py b/tests/storagefakelib.py
index 3ceac84..4ea4f3c 100644
--- a/tests/storagefakelib.py
+++ b/tests/storagefakelib.py
@@ -27,10 +27,10 @@
from vdsm.storage import exception as se
from vdsm.storage import lvm as real_lvm
+from vdsm.storage import resourceManager as rm
from vdsm.storage.constants import VG_EXTENT_SIZE_MB
from vdsm import utils
-from storage import resourceManager as rm
class FakeLVM(object):
# We pretend all PVs are 10G in size
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 2d501fa..db979ad 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -946,7 +946,6 @@
%{_datadir}/%{vdsm_name}/storage/merge.py*
%{_datadir}/%{vdsm_name}/storage/nfsSD.py*
%{_datadir}/%{vdsm_name}/storage/resourceFactories.py*
-%{_datadir}/%{vdsm_name}/storage/resourceManager.py*
%{_datadir}/%{vdsm_name}/storage/sdc.py*
%{_datadir}/%{vdsm_name}/storage/sd.py*
%{_datadir}/%{vdsm_name}/storage/sp.py*
@@ -1209,6 +1208,7 @@
%{python_sitelib}/%{vdsm_name}/storage/multipath.py*
%{python_sitelib}/%{vdsm_name}/storage/outOfProcess.py*
%{python_sitelib}/%{vdsm_name}/storage/persistent.py*
+%{python_sitelib}/%{vdsm_name}/storage/resourceManager.py*
%{python_sitelib}/%{vdsm_name}/storage/rwlock.py*
%{python_sitelib}/%{vdsm_name}/storage/securable.py*
%{python_sitelib}/%{vdsm_name}/storage/threadPool.py*
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index 3f39035..8ebecbb 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -39,7 +39,6 @@
monitor.py \
nfsSD.py \
resourceFactories.py \
- resourceManager.py \
sdc.py \
sd.py \
sp.py \
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 2dc4fc1..4f64be8 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -51,6 +51,7 @@
from vdsm.storage import misc
from vdsm.storage import mount
from vdsm.storage import multipath
+from vdsm.storage import resourceManager as rm
from vdsm.storage.persistent import PersistentDict, DictValidator
from vdsm.storage.threadlocal import vars
import vdsm.supervdsm as svdsm
@@ -60,7 +61,6 @@
import blockVolume
import resourceFactories
from storage_mailbox import MAILBOX_SIZE
-import resourceManager as rm
STORAGE_DOMAIN_TAG = "RHAT_storage_domain"
STORAGE_UNREADY_DOMAIN_TAG = STORAGE_DOMAIN_TAG + "_UNREADY"
diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py
index 2bada04..edb4c7a 100644
--- a/vdsm/storage/blockVolume.py
+++ b/vdsm/storage/blockVolume.py
@@ -33,6 +33,7 @@
from vdsm.storage import exception as se
from vdsm.storage import lvm
from vdsm.storage import misc
+from vdsm.storage import resourceManager as rm
from vdsm.storage.misc import deprecated
from vdsm.storage.threadlocal import vars
from vdsm.storage.volumemetadata import VolumeMetadata
@@ -43,7 +44,6 @@
import sd
import blockSD
import task
-import resourceManager as rm
from sdc import sdCache
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index faa49b1..799985f 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -56,6 +56,7 @@
from vdsm.storage import mount
from vdsm.storage import multipath
from vdsm.storage import outOfProcess as oop
+from vdsm.storage import resourceManager as rm
from vdsm.storage import types
from vdsm.storage.constants import STORAGE
from vdsm.storage.constants import SECTOR_SIZE
@@ -76,7 +77,6 @@
import image
import merge
import taskManager
-import resourceManager as rm
import dispatcher
import storageServer
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index 5a026d2..2720c04 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -33,6 +33,7 @@
from vdsm.storage import fileUtils
from vdsm.storage import imageSharing
from vdsm.storage import misc
+from vdsm.storage import resourceManager as rm
from vdsm.storage import workarounds
from vdsm.storage.threadlocal import vars
@@ -40,7 +41,6 @@
import sd
from vdsm.common.exception import ActionStopped
import task
-import resourceManager as rm
log = logging.getLogger('storage.Image')
diff --git a/vdsm/storage/merge.py b/vdsm/storage/merge.py
index 5f62a67..3ce2b37 100644
--- a/vdsm/storage/merge.py
+++ b/vdsm/storage/merge.py
@@ -45,9 +45,9 @@
from vdsm.storage import constants as sc
from vdsm.storage import exception as se
from vdsm.storage import guarded
+from vdsm.storage import resourceManager as rm
from storage import image
-from storage import resourceManager as rm
from storage import sd
from storage import volume
from storage.sdc import sdCache
diff --git a/vdsm/storage/resourceFactories.py b/vdsm/storage/resourceFactories.py
index 2bb3c02..9738ea2 100644
--- a/vdsm/storage/resourceFactories.py
+++ b/vdsm/storage/resourceFactories.py
@@ -24,9 +24,9 @@
from vdsm.storage import constants as sc
from vdsm.storage import exception as se
from vdsm.storage import lvm
+from vdsm.storage import resourceManager as rm
import logging
-import resourceManager as rm
from sdc import sdCache
import sd
import image
diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py
index d1a0528..7952602 100644
--- a/vdsm/storage/sd.py
+++ b/vdsm/storage/sd.py
@@ -32,13 +32,13 @@
from vdsm.storage import exception as se
from vdsm.storage import misc
from vdsm.storage import outOfProcess as oop
+from vdsm.storage import resourceManager as rm
from vdsm.storage import rwlock
from vdsm.storage import xlease
from vdsm.storage.persistent import unicodeEncoder, unicodeDecoder
import image
import resourceFactories
-import resourceManager as rm
from vdsm import constants
from vdsm import qemuimg
from vdsm import utils
diff --git a/vdsm/storage/sdm/api/copy_data.py b/vdsm/storage/sdm/api/copy_data.py
index 288521c..633a799 100644
--- a/vdsm/storage/sdm/api/copy_data.py
+++ b/vdsm/storage/sdm/api/copy_data.py
@@ -28,9 +28,9 @@
from vdsm import utils
from vdsm.storage import constants as sc
from vdsm.storage import guarded
+from vdsm.storage import resourceManager as rm
from vdsm.storage import workarounds
-from storage import resourceManager as rm
from storage import sd
from storage import volume
from storage.sdc import sdCache
diff --git a/vdsm/storage/sdm/api/create_volume.py b/vdsm/storage/sdm/api/create_volume.py
index ea8d7de..7d4d38f 100644
--- a/vdsm/storage/sdm/api/create_volume.py
+++ b/vdsm/storage/sdm/api/create_volume.py
@@ -23,8 +23,8 @@
from vdsm.common import exception
from vdsm.storage import constants as sc
from vdsm.storage import exception as se
+from vdsm.storage import resourceManager as rm
-from storage import resourceManager as rm
from storage import image, sd
from . import base
diff --git a/vdsm/storage/sdm/api/move_device.py b/vdsm/storage/sdm/api/move_device.py
index 774ead6..8278a5c 100644
--- a/vdsm/storage/sdm/api/move_device.py
+++ b/vdsm/storage/sdm/api/move_device.py
@@ -22,11 +22,11 @@
import six
-from storage import resourceManager as rm
from storage.sdc import sdCache
from vdsm import properties
from vdsm.storage import exception as se
from vdsm.storage.constants import STORAGE
+from vdsm.storage import resourceManager as rm
from . import base
diff --git a/vdsm/storage/sdm/api/reduce_domain.py b/vdsm/storage/sdm/api/reduce_domain.py
index 78d2c20..41e0787 100644
--- a/vdsm/storage/sdm/api/reduce_domain.py
+++ b/vdsm/storage/sdm/api/reduce_domain.py
@@ -20,11 +20,11 @@
from __future__ import absolute_import
-from storage import resourceManager as rm
from storage.sdc import sdCache
from vdsm import properties
from vdsm.storage import exception as se
from vdsm.storage.constants import STORAGE
+from vdsm.storage import resourceManager as rm
from . import base
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index fe065af..3972cb7 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -39,6 +39,7 @@
from vdsm.storage import fileUtils
from vdsm.storage import misc
from vdsm.storage import mount
+from vdsm.storage import resourceManager as rm
from vdsm.storage import xlease
from vdsm.storage.securable import secured, unsecured
@@ -50,7 +51,6 @@
from sdc import sdCache
import image
import merge
-import resourceManager as rm
POOL_MASTER_DOMAIN = 'mastersd'
diff --git a/vdsm/storage/task.py b/vdsm/storage/task.py
index b60e668..20fa809 100644
--- a/vdsm/storage/task.py
+++ b/vdsm/storage/task.py
@@ -55,9 +55,9 @@
from vdsm.storage import exception as se
from vdsm.storage.threadlocal import vars
from vdsm.storage import outOfProcess as oop
+from vdsm.storage import resourceManager
import uuid
-import resourceManager
from weakref import proxy
from vdsm import concurrent
from vdsm.config import config
diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index b43989c..53020f1 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -31,6 +31,7 @@
from vdsm.storage import fileUtils
from vdsm.storage import guarded
from vdsm.storage import misc
+from vdsm.storage import resourceManager as rm
from vdsm.storage.misc import deprecated
from vdsm.storage.threadlocal import vars
from vdsm.storage.volumemetadata import VolumeMetadata
@@ -38,7 +39,6 @@
import sd
from sdc import sdCache
import task
-import resourceManager as rm
DOMAIN_MNT_POINT = 'mnt'
--
To view, visit https://gerrit.ovirt.org/69328
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2546cf1b88f57362c94b817e2bc5cfca2db17a73
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 4 months
Change in vdsm[master]: py3: make toolBondingTests pass
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: py3: make toolBondingTests pass
......................................................................
py3: make toolBondingTests pass
I don't really know why, but under Python 3, file.close() seems to issue
another attempt to flush "invalid" data. The added code explicitly
ignores the ensuing exception.
Change-Id: I4487b787c3a14ca9508847572622f431f1188e7f
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/network/netinfo/bonding.py
M tests/Makefile.am
2 files changed, 9 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/66/65666/1
diff --git a/lib/vdsm/network/netinfo/bonding.py b/lib/vdsm/network/netinfo/bonding.py
index 0ca2259..2f40b88 100644
--- a/lib/vdsm/network/netinfo/bonding.py
+++ b/lib/vdsm/network/netinfo/bonding.py
@@ -218,7 +218,7 @@
e.g. 'ad_num_ports' or 'slaves'.
"""
return dict(((opt, val) for (opt, val)
- in _bond_opts_name2numeric(bond).iteritems()
+ in six.iteritems(_bond_opts_name2numeric(bond))
if opt not in EXCLUDED_BONDING_ENTRIES))
@@ -268,6 +268,14 @@
vals[name] = numeric
+ # On Python 3, the final close seems to issue another flush attempt,
+ # which results in a repeated exception. Ignore it.
+ try:
+ opt_file.close()
+ except EnvironmentError as e:
+ if e.errno not in (errno.EINVAL, errno.EPERM, errno.EACCES):
+ raise
+
return vals
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e96f226..6eb815b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -227,7 +227,6 @@
storage_workarounds_test.py \
storagefakelibTests.py \
storagetestlib_test.py \
- toolBondingTests.py \
unicode_test.py \
utilsTests.py \
v2vTests.py \
--
To view, visit https://gerrit.ovirt.org/65666
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4487b787c3a14ca9508847572622f431f1188e7f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 5 months
Change in vdsm[master]: pylint: fix super() calls
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: pylint: fix super() calls
......................................................................
pylint: fix super() calls
In normal cases, super() should not produce a proxy to a grandparent
class, but to an immediate parent class.
Change-Id: Ia31ab05ebec1fd83ca9bce4f0f064b9d943ac2ce
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/network/configurators/pyroute_two.py
M lib/yajsonrpc/__init__.py
M lib/yajsonrpc/stomp.py
M tests/utils_test.py
4 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/69344/1
diff --git a/lib/vdsm/network/configurators/pyroute_two.py b/lib/vdsm/network/configurators/pyroute_two.py
index 8aece53..e76bd48 100644
--- a/lib/vdsm/network/configurators/pyroute_two.py
+++ b/lib/vdsm/network/configurators/pyroute_two.py
@@ -44,7 +44,7 @@
class PyrouteTwo(Iproute2):
def __init__(self, inRollback=False):
self.unifiedPersistence = True
- super(Iproute2, self).__init__(ConfigApplier(), inRollback)
+ super(PyrouteTwo, self).__init__(ConfigApplier(), inRollback)
self.runningConfig = RunningConfig()
def commit(self):
diff --git a/lib/yajsonrpc/__init__.py b/lib/yajsonrpc/__init__.py
index 3a822ae..3485b8f 100644
--- a/lib/yajsonrpc/__init__.py
+++ b/lib/yajsonrpc/__init__.py
@@ -40,7 +40,7 @@
def __init__(self, code, msg):
self.code = code
self.message = msg
- super(RuntimeError, self).__init__(
+ super(JsonRpcError, self).__init__(
"[%d] %s" % (self.code, self.message)
)
diff --git a/lib/yajsonrpc/stomp.py b/lib/yajsonrpc/stomp.py
index 392a63a..d8eee6d 100644
--- a/lib/yajsonrpc/stomp.py
+++ b/lib/yajsonrpc/stomp.py
@@ -82,7 +82,7 @@
class StompError(RuntimeError):
def __init__(self, frame, message):
self.frame = frame
- super(RuntimeError, self).__init__(message)
+ super(StompError, self).__init__(message)
class _HeartBeatFrame(object):
diff --git a/tests/utils_test.py b/tests/utils_test.py
index df6921f..c9a23bd 100644
--- a/tests/utils_test.py
+++ b/tests/utils_test.py
@@ -532,7 +532,7 @@
def __init__(self, *a, **kw):
self.record = None
- super(TestCaseBase, self).__init__(*a, **kw)
+ super(TestTraceback, self).__init__(*a, **kw)
def testDefaults(self):
@utils.traceback()
--
To view, visit https://gerrit.ovirt.org/69344
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia31ab05ebec1fd83ca9bce4f0f064b9d943ac2ce
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 5 months
Change in vdsm[master]: replace dir() with vars() in few places
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: replace dir() with vars() in few places
......................................................................
replace dir() with vars() in few places
In 3 palces in our code, we make an effort to iterate only the variable
of a class, skipping special attributes based on their understcore
prefix. raymondh noted[*] that vars() is often forgotten. And indeed -
we did forget it.
There are 11 other references to dir() in the code, but changing them to
vars() is less obviously needed.
[*] https://www.youtube.com/watch?v=p33CVV29OG8
Change-Id: I0790b0bc78788e9b418121665e30bbfb48d40be6
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/libvirtconnection.py
M lib/yajsonrpc/stomp.py
M vdsm/virt/vmdevices/core.py
3 files changed, 7 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/79/68679/1
diff --git a/lib/vdsm/libvirtconnection.py b/lib/vdsm/libvirtconnection.py
index 63d961d..815aff4 100644
--- a/lib/vdsm/libvirtconnection.py
+++ b/lib/vdsm/libvirtconnection.py
@@ -122,9 +122,9 @@
try:
ret = f(*args, **kwargs)
if isinstance(ret, libvirt.virDomain):
- for name in dir(ret):
+ for name in vars(ret):
method = getattr(ret, name)
- if callable(method) and name[0] != '_':
+ if callable(method):
setattr(ret, name,
wrapMethod(utils.weakmethod(method)))
return ret
@@ -164,9 +164,9 @@
__connections[id(target)] = conn
setattr(conn, 'pingLibvirt', getattr(conn, 'getLibVersion'))
- for name in dir(libvirt.virConnect):
+ for name in vars(libvirt.virConnect):
method = getattr(conn, name)
- if callable(method) and name[0] != '_':
+ if callable(method):
setattr(conn, name,
wrapMethod(utils.weakmethod(method)))
if target is not None:
diff --git a/lib/yajsonrpc/stomp.py b/lib/yajsonrpc/stomp.py
index 392a63a..2954c21 100644
--- a/lib/yajsonrpc/stomp.py
+++ b/lib/yajsonrpc/stomp.py
@@ -71,8 +71,7 @@
HEARTEBEAT = "heart-beat"
-COMMANDS = tuple([command for command in dir(Command)
- if not command.startswith('_')])
+COMMANDS = tuple([command for command in vars(Command)])
class AckMode(object):
diff --git a/vdsm/virt/vmdevices/core.py b/vdsm/virt/vmdevices/core.py
index 4066ad7..e6d5738 100644
--- a/vdsm/virt/vmdevices/core.py
+++ b/vdsm/virt/vmdevices/core.py
@@ -54,8 +54,8 @@
self.is_hostdevice = False
def __str__(self):
- attrs = [':'.join((a, str(getattr(self, a, None)))) for a in dir(self)
- if not a.startswith('__')]
+ attrs = [':'.join((a, str(getattr(self, a, None))))
+ for a in vars(self)]
return ' '.join(attrs)
def is_attached_to(self, xml_string):
--
To view, visit https://gerrit.ovirt.org/68679
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0790b0bc78788e9b418121665e30bbfb48d40be6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 5 months
Change in vdsm[master]: netlink: monitor: join scanner thread on __exit__
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: netlink: monitor: join scanner thread on __exit__
......................................................................
netlink: monitor: join scanner thread on __exit__
In case a timeout occurs, the _scan() function ultimately ends, but
nothing explicitly waits on its control thread. It is harmless in the
case of netlink.monitor, but it is impolite to leak threads, even for a
short while.
This patch explicitly waits for the scan thread to finish before exiting
from an event monitor context manager.
The issue was spotted by running the tests with --countthreads.
Change-Id: I9dd0097ad8d6ba5288e27b8f02bc62fc562030e9
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/network/netlink/monitor.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/69041/1
diff --git a/lib/vdsm/network/netlink/monitor.py b/lib/vdsm/network/netlink/monitor.py
index 089c1ec..fc538e0 100644
--- a/lib/vdsm/network/netlink/monitor.py
+++ b/lib/vdsm/network/netlink/monitor.py
@@ -124,6 +124,7 @@
def __exit__(self, groups, timeout, silent_timeout):
if not self.is_stopped():
self.stop()
+ self._scan_thread.join()
def start(self):
if self._timeout:
@@ -168,7 +169,6 @@
self._scanning_stopped.set()
self._scanning_started.wait()
os.write(self._pipetrick[1], b'c')
- self._scan_thread.join()
def is_stopped(self):
return self._scanning_stopped.is_set()
--
To view, visit https://gerrit.ovirt.org/69041
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9dd0097ad8d6ba5288e27b8f02bc62fc562030e9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 5 months
Change in vdsm[master]: introduce pylint check
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: introduce pylint check
......................................................................
introduce pylint check
pylint is a static code checker. yum-install pylint in your developement
environment, and do `make pylint` to see if your new code has not
introduced new errors.
Note that currently, pylint does not pass quietly on our code base. I
had to disable three of its checks, and to have a blacklist of files. I
hope that with time, we can eliminate the blacklist.
Further note that `make pylint` is very slow, and then was not added to
`make check`. You have to run it excplicitly to enjoy it. But please do.
I can find simple, but painful, glitches.
Change-Id: I85eca67784f82876b262b4452506e0f47486695b
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M Makefile.am
D pylintrc
2 files changed, 51 insertions(+), 320 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/69345/1
diff --git a/Makefile.am b/Makefile.am
index 1423f5e..6637ef7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -87,6 +87,57 @@
echo "Missing absolute_import in $$f"; exit 1; fi; \
done;
+pylint_blacklist = \
+ lib/vdsm/network/ip/__init__.py \
+ lib/vdsm/network/ip/address.py \
+ lib/vdsm/network/tc/__init__.py \
+ lib/vdsm/network/tc/filter.py \
+ lib/vdsm/storage/__init__.py \
+ lib/vdsm/storage/iscsi.py \
+ lib/vdsm/storage/misc.py \
+ lib/vdsm/storage/resourceManager.py \
+ lib/vdsm/storage/task.py \
+ lib/yajsonrpc/__init__.py \
+ lib/yajsonrpc/stomp.py \
+ tests/__init__.py \
+ tests/check_imports.py \
+ tests/executorTests.py \
+ tests/functional/__init__ \
+ tests/functional/networkTestsOVS.py \
+ tests/functional/networkTests.py \
+ tests/functional/utils.py \
+ tests/integration/jsonRpcHelper.py \
+ tests/jobsTests.py \
+ tests/libvirtconnectionTests.py \
+ tests/monkeypatchTests.py \
+ tests/network/__init__.py \
+ tests/network/ifacquire_test.py \
+ tests/network/netfunctestlib.py \
+ tests/network/vm_migrate_hook_test.py \
+ tests/storage_monitor_test.py \
+ tests/storage_resourcemanager_test.py \
+ tests/storage_securable_test.py \
+ tests/vmfakelib.py \
+ tests/vmApiTests.py \
+ vdsm/storage/__init__.py \
+ vdsm/storage/image.py \
+ vdsm/storage/monitor.py \
+ vdsm/storage/sp.py \
+ vdsm/storage/volume.py \
+ vdsm/virt/vmdevices/storage.py \
+ vdsm_hooks/checkimages/before_vm_start.py \
+ $(NULL)
+
+.PHONY: pylint
+pylint:
+ all_modules=`mktemp` && \
+ blacklist=`mktemp` && \
+ git ls-files | grep '\.py$$' | sort > "$$all_modules" && \
+ echo $(pylint_blacklist) | tr \ \\n | sort > "$$blacklist" && \
+ modules=$$(comm -2 -3 "$$all_modules" "$$blacklist") && \
+ rm -f "$$all_modules" "$$blacklist" && \
+ pylint -E --disable=import-error,no-name-in-module,no-member $$modules
+
.PHONY: flake8
flake8: tox
tox -e flake8
diff --git a/pylintrc b/pylintrc
deleted file mode 100644
index b236555..0000000
--- a/pylintrc
+++ /dev/null
@@ -1,320 +0,0 @@
-# lint Python modules using external checkers.
-#
-# This is the main checker controling the other ones and the reports
-# generation. It is itself both a raw checker and an astng checker in order
-# to:
-# * handle message activation / deactivation at the module level
-# * handle some basic but necessary stats'data (number of classes, methods...)
-#
-[MASTER]
-
-# Specify a configuration file.
-#rcfile=
-
-# Profiled execution.
-profile=no
-
-# Add <file or directory> to the black list. It should be a base name, not a
-# path. You may set this option multiple times.
-ignore=.git
-
-# Pickle collected data for later comparisons.
-persistent=yes
-
-# Set the cache size for astng objects.
-cache-size=500
-
-# List of plugins (as comma separated values of python modules names) to load,
-# usually to register additional checkers.
-load-plugins=
-
-
-[MESSAGES CONTROL]
-
-# Enable only checker(s) with the given id(s). This option conflict with the
-# disable-checker option
-#enable-checker=
-
-# Enable all checker(s) except those with the given id(s). This option conflict
-# with the disable-checker option
-#disable-checker=
-
-# Enable all messages in the listed categories.
-#enable-msg-cat=
-
-# Disable all messages in the listed categories.
-#disable-msg-cat=
-
-# Enable the message(s) with the given id(s).
-#enable-msg=
-
-# Disable the message(s) with the given id(s).
-disable-msg=C0323,W0142,C0301,C0103,C0111,E0213,C0302,C0203,W0703,R0201,W0613,W0612,W0622
-
-# C0323: Operator not followed by a space
-# W0142: Used * or ** magic
-# C0301: Line too long (%s/%s)
-# C0103: Invalid name "%s" (should match %s)
-# C0111: Missing docstring
-# E0213: Method should have "self" as first argument
-# C0302: Too many lines in module (%s)
-# C0203: Metaclass method should have "mcs" as first argument
-# W0703: Catch "Exception"
-# R0201: Method could be a function
-# W0613: Unused argument %r
-# W0612: Unused variable %r
-# W0622: Redefining built-in %r
-
-# Disabled checks
-disable=W0142
-
-[REPORTS]
-
-# set the output format. Available formats are text, parseable, colorized and
-# html
-output-format=colorized
-
-# Include message's id in output
-include-ids=yes
-
-# Put messages in a separate file for each module / package specified on the
-# command line instead of printing them on stdout. Reports (if any) will be
-# written in a file name "pylint_global.[txt|html]".
-files-output=no
-
-# Tells wether to display a full report or only the messages
-reports=yes
-
-# Python expression which should return a note less than 10 (10 is the highest
-# note).You have access to the variables errors warning, statement which
-# respectivly contain the number of errors / warnings messages and the total
-# number of statements analyzed. This is used by the global evaluation report
-# (R0004).
-evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
-
-# Add a comment according to your evaluation note. This is used by the global
-# evaluation report (R0004).
-comment=no
-
-# Enable the report(s) with the given id(s).
-#enable-report=
-
-# Disable the report(s) with the given id(s).
-#disable-report=
-
-
-# checks for
-# * unused variables / imports
-# * undefined variables
-# * redefinition of variable from builtins or from an outer scope
-# * use of variable before assigment
-#
-[VARIABLES]
-
-# Tells wether we should check for unused import in __init__ files.
-init-import=no
-
-# A regular expression matching names used for dummy variables (i.e. not used).
-dummy-variables-rgx=_|dummy
-
-# List of additional names supposed to be defined in builtins. Remember that
-# you should avoid to define new builtins when possible.
-additional-builtins=
-
-
-# try to find bugs in the code using type inference
-#
-[TYPECHECK]
-
-# Tells wether missing members accessed in mixin class should be ignored. A
-# mixin class is detected if its name ends with "mixin" (case insensitive).
-ignore-mixin-members=yes
-
-# When zope mode is activated, consider the acquired-members option to ignore
-# access to some undefined attributes.
-zope=no
-
-# List of members which are usually get through zope's acquisition mecanism and
-# so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
-acquired-members=REQUEST,acl_users,aq_parent
-
-
-# checks for :
-# * doc strings
-# * modules / classes / functions / methods / arguments / variables name
-# * number of arguments, local variables, branchs, returns and statements in
-# functions, methods
-# * required module attributes
-# * dangerous default values as arguments
-# * redefinition of function / method / class
-# * uses of the global statement
-#
-[BASIC]
-
-# Required attributes for module, separated by a comma
-required-attributes=
-
-# Regular expression which should only match functions or classes name which do
-# not require a docstring
-no-docstring-rgx=__.*__
-
-# Regular expression which should only match correct module names
-module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
-
-# Regular expression which should only match correct module level names
-const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
-
-# Regular expression which should only match correct class names
-class-rgx=[A-Z_][a-zA-Z0-9]+$
-
-# Regular expression which should only match correct function names
-function-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
-
-# Regular expression which should only match correct method names
-# method-rgx=[a-z_][a-z0-9_]{2,30}$ (default)
-method-rgx=_?([a-z]|__)[a-zA-Z0-9]*(__)?$
-
-# Regular expression which should only match correct instance attribute names
-attr-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
-
-# Regular expression which should only match correct argument names
-# argument-rgx=[a-z_][a-z0-9_]{2,30}$ (default)
-argument-rgx=([a-z_]+[a-zA-Z0-9]*$||(__.*__))$
-
-# Regular expression which should only match correct variable names
-# variable-rgx=[a-z_][a-z0-9_]{2,30}$ (default)
-variable-rgx=([a-z_]+[a-zA-Z0-9]*$||(__.*__))$
-
-# Regular expression which should only match correct list comprehension /
-# generator expression variable names
-inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
-
-# Good variable names which should always be accepted, separated by a comma
-good-names=i,j,k,ex,Run,_,e
-
-# Bad variable names which should always be refused, separated by a comma
-bad-names=foo,bar,baz,toto,tutu,tata
-
-# List of builtins function names that should not be used, separated by a comma
-bad-functions=apply,input,exec,eval
-
-
-# checks for sign of poor/misdesign:
-# * number of methods, attributes, local variables...
-# * size, complexity of functions, methods
-#
-[DESIGN]
-
-# Maximum number of arguments for function / method
-max-args=12
-
-# Maximum number of locals for function / method body
-max-locals=30
-
-# Maximum number of return / yield for function / method body
-max-returns=12
-
-# Maximum number of branch for function / method body
-max-branchs=30
-
-# Maximum number of statements in function / method body
-max-statements=60
-
-# Maximum number of parents for a class (see R0901).
-max-parents=7
-
-# Maximum number of attributes for a class (see R0902).
-max-attributes=20
-
-# Minimum number of public methods for a class (see R0903).
-min-public-methods=0
-
-# Maximum number of public methods for a class (see R0904).
-max-public-methods=20
-
-
-# checks for
-# * external modules dependencies
-# * relative / wildcard imports
-# * cyclic imports
-# * uses of deprecated modules
-#
-[IMPORTS]
-
-# Deprecated modules which should not be used, separated by a comma
-deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
-
-# Create a graph of every (i.e. internal and external) dependencies in the
-# given file (report R0402 must not be disabled)
-import-graph=
-
-# Create a graph of external dependencies in the given file (report R0402 must
-# not be disabled)
-ext-import-graph=
-
-# Create a graph of internal dependencies in the given file (report R0402 must
-# not be disabled)
-int-import-graph=
-
-
-# checks for :
-# * methods without self as first argument
-# * overridden methods signature
-# * access only to existant members via self
-# * attributes not defined in the __init__ method
-# * supported interfaces implementation
-# * unreachable code
-#
-[CLASSES]
-
-# List of interface methods to ignore, separated by a comma. This is used for
-# instance to not check methods defines in Zope's Interface base class.
-ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
-
-# List of method names used to declare (i.e. assign) instance attributes.
-defining-attr-methods=__init__,__new__,setUp
-
-
-# checks for similarities and duplicated code. This computation may be
-# memory / CPU intensive, so you should disable it if you experiments some
-# problems.
-#
-[SIMILARITIES]
-
-# Minimum lines number of a similarity.
-min-similarity-lines=10
-
-# Ignore comments when computing similarities.
-ignore-comments=yes
-
-# Ignore docstrings when computing similarities.
-ignore-docstrings=yes
-
-
-# checks for:
-# * warning notes in the code like FIXME, XXX
-# * PEP 263: source code with non ascii character but no encoding declaration
-#
-[MISCELLANEOUS]
-
-# List of note tags to take in consideration, separated by a comma.
-notes=FIXME,XXX,TODO
-
-
-# checks for :
-# * unauthorized constructions
-# * strict indentation
-# * line length
-# * use of <> instead of !=
-#
-[FORMAT]
-
-# Maximum number of characters on a single line.
-max-line-length=79
-
-# Maximum number of lines in a module
-max-module-lines=1000
-
-# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
-# tab).
-indent-string=' '
--
To view, visit https://gerrit.ovirt.org/69345
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I85eca67784f82876b262b4452506e0f47486695b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 5 months
Change in vdsm[ovirt-4.1]: automation: adding f25 conf files
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has uploaded a new change for review.
Change subject: automation: adding f25 conf files
......................................................................
automation: adding f25 conf files
Change-Id: Ie7d527a269db00a933d2511f91134a06caacbb6b
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
A automation/build-artifacts-manual.packages.fc25
A automation/build-artifacts-manual.repos.fc25
A automation/build-artifacts.packages.fc25
A automation/build-artifacts.repos.fc25
A automation/check-merged.packages.fc25
A automation/check-merged.repos.fc25
6 files changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/69244/1
diff --git a/automation/build-artifacts-manual.packages.fc25 b/automation/build-artifacts-manual.packages.fc25
new file mode 120000
index 0000000..179ee82
--- /dev/null
+++ b/automation/build-artifacts-manual.packages.fc25
@@ -0,0 +1 @@
+build-artifacts.packages.fc25
\ No newline at end of file
diff --git a/automation/build-artifacts-manual.repos.fc25 b/automation/build-artifacts-manual.repos.fc25
new file mode 120000
index 0000000..1841c6e
--- /dev/null
+++ b/automation/build-artifacts-manual.repos.fc25
@@ -0,0 +1 @@
+build-artifacts.repos.fc25
\ No newline at end of file
diff --git a/automation/build-artifacts.packages.fc25 b/automation/build-artifacts.packages.fc25
new file mode 120000
index 0000000..040987f
--- /dev/null
+++ b/automation/build-artifacts.packages.fc25
@@ -0,0 +1 @@
+build-artifacts.packages.fc24
\ No newline at end of file
diff --git a/automation/build-artifacts.repos.fc25 b/automation/build-artifacts.repos.fc25
new file mode 120000
index 0000000..3fe2925
--- /dev/null
+++ b/automation/build-artifacts.repos.fc25
@@ -0,0 +1 @@
+check-merged.repos.fc25
\ No newline at end of file
diff --git a/automation/check-merged.packages.fc25 b/automation/check-merged.packages.fc25
new file mode 120000
index 0000000..c5e146e
--- /dev/null
+++ b/automation/check-merged.packages.fc25
@@ -0,0 +1 @@
+check-merged.packages.fc24
\ No newline at end of file
diff --git a/automation/check-merged.repos.fc25 b/automation/check-merged.repos.fc25
new file mode 120000
index 0000000..9afbbd4
--- /dev/null
+++ b/automation/check-merged.repos.fc25
@@ -0,0 +1 @@
+check-patch.repos.fc25
\ No newline at end of file
--
To view, visit https://gerrit.ovirt.org/69244
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7d527a269db00a933d2511f91134a06caacbb6b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.1
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
6 years, 5 months