Francesco Romani has uploaded a new change for review.
Change subject: lib: move the response.py under common ......................................................................
lib: move the response.py under common
The commit fc732ae broke the rule that code under lib/vdsm/common should depend only on code under the same subtree.
The last module we need to move to fix the breakage is 'response'. Once again, this makes sense to be moved in the common layer anyway.
Change-Id: I6263fb8991a226516ba5d14e909a4a70ea0078d2 Signed-off-by: Francesco Romani fromani@redhat.com --- M lib/vdsm/Makefile.am M lib/vdsm/common/api.py R lib/vdsm/common/response.py M lib/vdsm/jobs.py M lib/vdsm/jsonrpcvdscli.py M lib/vdsm/v2v.py M lib/vdsm/virt/secret.py M lib/vdsm/virt/vmpowerdown.py M tests/api_test.py M tests/jobsTests.py M tests/responseTests.py M tests/vmMigrationTests.py M tests/vmOperationsTests.py M tests/vmRecoveryTests.py M tests/vmSecretTests.py M tests/vmTests.py M tests/vmfakelib.py M vdsm.spec.in M vdsm/API.py M vdsm/clientIF.py M vdsm/virt/migration.py M vdsm/virt/recovery.py M vdsm/virt/vm.py 23 files changed, 22 insertions(+), 22 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/63954/1
diff --git a/lib/vdsm/Makefile.am b/lib/vdsm/Makefile.am index 077fd98..d248d30 100644 --- a/lib/vdsm/Makefile.am +++ b/lib/vdsm/Makefile.am @@ -52,7 +52,6 @@ protocoldetector.py \ pthread.py \ qemuimg.py \ - response.py \ schedule.py \ sslcompat.py \ sslutils.py \ diff --git a/lib/vdsm/common/api.py b/lib/vdsm/common/api.py index 603455a..8ba23fd 100644 --- a/lib/vdsm/common/api.py +++ b/lib/vdsm/common/api.py @@ -23,8 +23,7 @@ import logging
from . import exception - -from vdsm import response +from . import response
_log = logging.getLogger("virt.api") diff --git a/lib/vdsm/response.py b/lib/vdsm/common/response.py similarity index 100% rename from lib/vdsm/response.py rename to lib/vdsm/common/response.py diff --git a/lib/vdsm/jobs.py b/lib/vdsm/jobs.py index 3ad5511..f3e0357 100644 --- a/lib/vdsm/jobs.py +++ b/lib/vdsm/jobs.py @@ -23,7 +23,7 @@ import threading
from vdsm.common import exception -from vdsm import response +from vdsm.common import response
_lock = threading.Lock() diff --git a/lib/vdsm/jsonrpcvdscli.py b/lib/vdsm/jsonrpcvdscli.py index d725a6b..670a02b 100644 --- a/lib/vdsm/jsonrpcvdscli.py +++ b/lib/vdsm/jsonrpcvdscli.py @@ -31,7 +31,7 @@ CALL_TIMEOUT
from api import vdsmapi -from vdsm import response +from vdsm.common import response from .config import config from . import sslutils
diff --git a/lib/vdsm/v2v.py b/lib/vdsm/v2v.py index 2eedf75..b21a096 100644 --- a/lib/vdsm/v2v.py +++ b/lib/vdsm/v2v.py @@ -44,10 +44,11 @@
from vdsm.commands import execCmd, BUFFSIZE from vdsm.common.define import errCode, doneCode +from vdsm.common import response from vdsm.common import zombiereaper from vdsm.compat import CPopen from vdsm.constants import P_VDSM_LOG, P_VDSM_RUN, EXT_KVM_2_OVIRT -from vdsm import cmdutils, concurrent, libvirtconnection, response +from vdsm import cmdutils, concurrent, libvirtconnection from vdsm.utils import monotonic_time, traceback, CommandPath, \ NICENESS, IOCLASS
diff --git a/lib/vdsm/virt/secret.py b/lib/vdsm/virt/secret.py index 6d20f35..d94cffe 100644 --- a/lib/vdsm/virt/secret.py +++ b/lib/vdsm/virt/secret.py @@ -25,8 +25,8 @@ import logging import uuid
+from vdsm.common import response from vdsm import libvirtconnection -from vdsm import response
def register(secrets, clear=False): diff --git a/lib/vdsm/virt/vmpowerdown.py b/lib/vdsm/virt/vmpowerdown.py index 52356e5..f7bdc3c 100644 --- a/lib/vdsm/virt/vmpowerdown.py +++ b/lib/vdsm/virt/vmpowerdown.py @@ -20,7 +20,7 @@ from __future__ import absolute_import
from vdsm.common.define import doneCode, errCode -from vdsm import response +from vdsm.common import response from vdsm import utils
diff --git a/tests/api_test.py b/tests/api_test.py index 93e542e..b5e3aea 100644 --- a/tests/api_test.py +++ b/tests/api_test.py @@ -22,6 +22,7 @@
from vdsm.common import api from vdsm.common import exception +from vdsm.common import response
from testlib import VdsmTestCase as TestCaseBase
diff --git a/tests/jobsTests.py b/tests/jobsTests.py index cb390f9..536adc9 100644 --- a/tests/jobsTests.py +++ b/tests/jobsTests.py @@ -20,7 +20,8 @@ import uuid
from vdsm.common import exception -from vdsm import jobs, response +from vdsm.common import response +from vdsm import jobs
from testlib import VdsmTestCase, expandPermutations, permutations from testlib import wait_for_job diff --git a/tests/responseTests.py b/tests/responseTests.py index 49b3e47..3b5cc8c 100644 --- a/tests/responseTests.py +++ b/tests/responseTests.py @@ -18,7 +18,7 @@ # Refer to the README and COPYING files for full details of the license #
-from vdsm import response +from vdsm.common import response from vdsm.common.define import doneCode from vdsm.common.define import errCode
diff --git a/tests/vmMigrationTests.py b/tests/vmMigrationTests.py index feee3de..b3d2d1c 100644 --- a/tests/vmMigrationTests.py +++ b/tests/vmMigrationTests.py @@ -26,9 +26,9 @@ from six.moves import range from six.moves import zip
+from vdsm.common import response from vdsm.config import config from vdsm.virt import vmstatus -from vdsm import response from virt import migration
from monkeypatch import MonkeyPatchScope diff --git a/tests/vmOperationsTests.py b/tests/vmOperationsTests.py index e5ce498..39d46a1 100644 --- a/tests/vmOperationsTests.py +++ b/tests/vmOperationsTests.py @@ -30,10 +30,10 @@
from virt.vmdevices import hwclass from vdsm.common import define +from vdsm.common import response from vdsm import hooks from vdsm import libvirtconnection from vdsm import password -from vdsm import response
from monkeypatch import MonkeyPatch, MonkeyPatchScope from testlib import VdsmTestCase as TestCaseBase diff --git a/tests/vmRecoveryTests.py b/tests/vmRecoveryTests.py index 219b357..7fea52c 100644 --- a/tests/vmRecoveryTests.py +++ b/tests/vmRecoveryTests.py @@ -23,10 +23,10 @@ import os
from virt import recovery +from vdsm.common import response from vdsm.compat import pickle from vdsm import constants from vdsm import cpuarch -from vdsm import response
from monkeypatch import MonkeyPatchScope diff --git a/tests/vmSecretTests.py b/tests/vmSecretTests.py index b680dea..e720b02 100644 --- a/tests/vmSecretTests.py +++ b/tests/vmSecretTests.py @@ -28,8 +28,8 @@ from testlib import expandPermutations, permutations import vmfakelib
+from vdsm.common import response from vdsm import libvirtconnection -from vdsm import response from vdsm.password import ProtectedPassword from vdsm.virt import secret
diff --git a/tests/vmTests.py b/tests/vmTests.py index 891b62d..6b7bb61 100644 --- a/tests/vmTests.py +++ b/tests/vmTests.py @@ -51,9 +51,9 @@ from vdsm import constants from vdsm import cpuarch from vdsm.common import define +from vdsm.common import response from vdsm import osinfo from vdsm import password -from vdsm import response from testlib import VdsmTestCase as TestCaseBase from testlib import permutations, expandPermutations from testlib import find_xml_element diff --git a/tests/vmfakelib.py b/tests/vmfakelib.py index 07eeec6..137f6bc 100644 --- a/tests/vmfakelib.py +++ b/tests/vmfakelib.py @@ -31,7 +31,7 @@ from vdsm import constants from vdsm import cpuarch from vdsm import libvirtconnection -from vdsm import response +from vdsm.common import response from vdsm.virt import sampling
import clientIF diff --git a/vdsm.spec.in b/vdsm.spec.in index 76ca539..b262287 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -1252,7 +1252,6 @@ %{python_sitelib}/%{vdsm_name}/protocoldetector.py* %{python_sitelib}/%{vdsm_name}/pthread.py* %{python_sitelib}/%{vdsm_name}/qemuimg.py* -%{python_sitelib}/%{vdsm_name}/response.py* %{python_sitelib}/%{vdsm_name}/schedule.py* %{python_sitelib}/%{vdsm_name}/sslcompat.py* %{python_sitelib}/%{vdsm_name}/sslutils.py* diff --git a/vdsm/API.py b/vdsm/API.py index 8af4a48..f000297 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -31,12 +31,12 @@ from vdsm import logUtils from vdsm import hooks from vdsm import hostdev -from vdsm import response from vdsm import supervdsm from vdsm import throttledlog from vdsm import jobs from vdsm import v2v from vdsm.common import exception +from vdsm.common import response from vdsm.host import api as hostapi from vdsm.logUtils import AllVmStatsValue, Suppressed from vdsm.storage import clusterlock diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py index 0fbd3df..fefc915 100644 --- a/vdsm/clientIF.py +++ b/vdsm/clientIF.py @@ -47,7 +47,7 @@ from vdsm import numa from vdsm import utils from vdsm import supervdsm -from vdsm import response +from vdsm.common import response
from virt import migration from virt import recovery diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py index ebf444d..ef1f8a4 100644 --- a/vdsm/virt/migration.py +++ b/vdsm/virt/migration.py @@ -26,7 +26,7 @@ from vdsm import concurrent from vdsm import hooks from vdsm import kaxmlrpclib -from vdsm import response +from vdsm.common import response from vdsm import utils from vdsm import vdscli from vdsm import jsonrpcvdscli diff --git a/vdsm/virt/recovery.py b/vdsm/virt/recovery.py index 327d2ca..b370a96 100644 --- a/vdsm/virt/recovery.py +++ b/vdsm/virt/recovery.py @@ -27,10 +27,10 @@
import libvirt
+from vdsm.common import response from vdsm.compat import pickle from vdsm import constants from vdsm import libvirtconnection -from vdsm import response from vdsm import utils from vdsm.virt import vmchannels from vdsm.virt import vmstatus diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 7dea5d8..bdab889 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -36,6 +36,7 @@ import libvirt
# vdsm imports +from vdsm.common import response from vdsm import concurrent from vdsm import constants from vdsm import cpuarch @@ -45,7 +46,6 @@ from vdsm import numa from vdsm import osinfo from vdsm import qemuimg -from vdsm import response from vdsm import supervdsm from vdsm import utils from vdsm.compat import pickle
gerrit-hooks has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
Nir Soffer has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 1: Code-Review+1
Hoping you got it right.
gerrit-hooks has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 2:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
Piotr Kliczewski has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 2: Code-Review+2
Nir Soffer has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 2:
Francesco, can you verify?
Nir Soffer has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 2:
Please rebase, we had lot of merges today.
Francesco Romani has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 2: Verified+1
Verified together: 63952 63953 63954
This is a simple code move; I tried patched Vdsm performing various simple VM flows (boot/shutdown/migration back and forth/adding a new VM disk) with no issues in sight.
Also 'make rpm' passed without issues.
I think this is good enough for V+1 on master.
gerrit-hooks has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 3:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
Francesco Romani has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 3: Verified+1
restoring score after the rebase
Francesco Romani has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 3:
Junkins failure is unrelated:
DEBUG package_manager.py:96: ['/usr/bin/yum-deprecated', '--installroot', '/var/lib/mock/epel-7-x86_64-dcebbf316d769782f44acc0ef5f2397b-31868/root/', '--releasever', '7', 'install', '@buildsys-build'] DEBUG util.py:567: child environment: None DEBUG util.py:499: Executing command: ['/usr/bin/yum-deprecated', '--installroot', '/var/lib/mock/epel-7-x86_64-dcebbf316d769782f44acc0ef5f2397b-31868/root/', '--releasever', '7', 'install', '@buildsys-build', '--setopt=tsflags=nocontexts'] with env {'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LD_PRELOAD': '/tmp/tmpg21g8hqp/$LIB/nosync.so', 'LANG': 'en_US.UTF-8', 'HOME': '/builddir', 'SHELL': '/bin/bash', 'PROMPT_COMMAND': 'printf "\033]0;<mock-chroot>\007"', 'PS1': '<mock-chroot> \s-\v\$ ', 'TERM': 'vt100', 'LC_MESSAGES': 'C'} and shell False DEBUG util.py:421: Yum command has been deprecated, use dnf instead. DEBUG util.py:421: See 'man dnf' and 'man yum2dnf' for more information. DEBUG util.py:421: http://download.fedoraproject.org/pub/epel/7/x86_64/repodata/49b8ba752141a73...: [Errno 14] HTTP Error 404 - Not Found DEBUG util.py:421: Trying other mirror. DEBUG util.py:421: http://download.fedoraproject.org/pub/epel/7/x86_64/repodata/58c0449c85c258e...: [Errno 14] HTTP Error 404 - Not Found DEBUG util.py:421: Trying other mirror. DEBUG util.py:421: http://download.fedoraproject.org/pub/epel/7/x86_64/repodata/58c0449c85c258e...: [Errno 14] HTTP Error 404 - Not Found DEBUG util.py:421: Trying other mirror. DEBUG util.py:421: http://download.fedoraproject.org/pub/epel/7/x86_64/repodata/58c0449c85c258e...: [Errno 14] HTTP Error 404 - Not Found DEBUG util.py:421: Trying other mirror. DEBUG util.py:421: One of the configured repositories failed ("Custom epel"), DEBUG util.py:421: and yum doesn't have enough cached data to continue. At this point the only DEBUG util.py:421: safe thing yum can do is fail. There are a few ways to work "fix" this: DEBUG util.py:421: 1. Contact the upstream for the repository and get them to fix the problem. DEBUG util.py:421: 2. Reconfigure the baseurl/etc. for the repository, to point to a working DEBUG util.py:421: upstream. This is most often useful if you are using a newer DEBUG util.py:421: distribution release than is supported by the repository (and the DEBUG util.py:421: packages for the previous distribution release still work). DEBUG util.py:421: 3. Disable the repository, so yum won't use it by default. Yum will then DEBUG util.py:421: just ignore the repository until you permanently enable it again or use DEBUG util.py:421: --enablerepo for temporary usage: DEBUG util.py:421: yum-config-manager --disable epel DEBUG util.py:421: 4. Configure the failing repository to be skipped, if it is unavailable. DEBUG util.py:421: Note that yum will try to contact the repo. when it runs most commands, DEBUG util.py:421: so will have to try and fail each time (and thus. yum will be be much DEBUG util.py:421: slower). If it is a very temporary problem though, this is often a nice DEBUG util.py:421: compromise: DEBUG util.py:421: yum-config-manager --save --setopt=epel.skip_if_unavailable=true DEBUG util.py:421: failure: repodata/58c0449c85c258e5d9389d7ab796ea196c56cf13a5f12d7bbb020b8c3d8bc598-primary.sqlite.xz from epel: [Errno 256] No more mirrors to try. DEBUG util.py:421: http://download.fedoraproject.org/pub/epel/7/x86_64/repodata/58c0449c85c258e...: [Errno 14] HTTP Error 404 - Not Found DEBUG util.py:546: Child return code was: 1
Piotr Kliczewski has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 3: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: lib: move the response.py under common ......................................................................
lib: move the response.py under common
The commit fc732ae broke the rule that code under lib/vdsm/common should depend only on code under the same subtree.
The last module we need to move to fix the breakage is 'response'. Once again, this makes sense to be moved in the common layer anyway.
Change-Id: I6263fb8991a226516ba5d14e909a4a70ea0078d2 Signed-off-by: Francesco Romani fromani@redhat.com Reviewed-on: https://gerrit.ovirt.org/63954 Continuous-Integration: Jenkins CI Reviewed-by: Piotr Kliczewski piotr.kliczewski@gmail.com --- M lib/vdsm/Makefile.am M lib/vdsm/common/api.py R lib/vdsm/common/response.py M lib/vdsm/jobs.py M lib/vdsm/jsonrpcvdscli.py M lib/vdsm/v2v.py M lib/vdsm/virt/secret.py M lib/vdsm/virt/vmpowerdown.py M tests/api_test.py M tests/jobsTests.py M tests/responseTests.py M tests/vmMigrationTests.py M tests/vmOperationsTests.py M tests/vmRecoveryTests.py M tests/vmSecretTests.py M tests/vmTests.py M tests/vmfakelib.py M vdsm.spec.in M vdsm/API.py M vdsm/clientIF.py M vdsm/virt/migration.py M vdsm/virt/recovery.py M vdsm/virt/vm.py 23 files changed, 22 insertions(+), 25 deletions(-)
Approvals: Piotr Kliczewski: Looks good to me, approved Jenkins CI: Passed CI tests Francesco Romani: Verified
gerrit-hooks has posted comments on this change.
Change subject: lib: move the response.py under common ......................................................................
Patch Set 4:
* Update tracker: IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found.
vdsm-patches@lists.fedorahosted.org