From: Jan Fajerski Date: Thu, 30 Jul 2020 09:46:00 +0000 (+0200) Subject: ceph-volume: dependency on python-ceph-common X-Git-Tag: v16.1.0~1511^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cb432fe41d4ea8cb71aa592e0727d2da1978121f;p=ceph.git ceph-volume: dependency on python-ceph-common Since e5b585d15de8b07e0a179344d4187582a5c069f2 ceph-volume depends on python-ceph-common. This commit introduces this dependency for the ceph-osd rpm (which includes ceph-volume) and installs the dependency for tox runs. Fixes: https://tracker.ceph.com/issues/46772 Fixes: e5b585d15de8b07e0a179344d4187582a5c069f2 Signed-off-by: Jan Fajerski --- diff --git a/ceph.spec.in b/ceph.spec.in index 4b20dc2fa194..74a6af07f878 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -693,6 +693,7 @@ Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} Requires: lvm2 Requires: sudo Requires: libstoragemgmt +Requires: python%{python3_pkgversion}-ceph-common = %{_epoch_prefix}%{version}-%{release} %description osd ceph-osd is the object storage daemon for the Ceph distributed file system. It is responsible for storing objects on a local file system diff --git a/src/ceph-volume/ceph_volume/tests/api/test_lvm.py b/src/ceph-volume/ceph_volume/tests/api/test_lvm.py index 363fa10734e2..cdb6c8c79dd4 100644 --- a/src/ceph-volume/ceph_volume/tests/api/test_lvm.py +++ b/src/ceph-volume/ceph_volume/tests/api/test_lvm.py @@ -223,8 +223,8 @@ class TestVolume(object): @pytest.mark.parametrize('dev',[ '/dev/sdb', api.VolumeGroup(vg_name='foo'), - api.Volume(lv_name='vg/no_osd', lv_tags=''), - api.Volume(lv_name='vg/no_osd', lv_tags='ceph.osd_id=null'), + api.Volume(lv_name='vg/no_osd', lv_tags='', lv_path='lv/path'), + api.Volume(lv_name='vg/no_osd', lv_tags='ceph.osd_id=null', lv_path='lv/path'), None, ]) def test_is_not_ceph_device(self, dev): diff --git a/src/ceph-volume/setup.py b/src/ceph-volume/setup.py index a9fbdf8985b1..44a0d0e46899 100644 --- a/src/ceph-volume/setup.py +++ b/src/ceph-volume/setup.py @@ -20,6 +20,7 @@ setup( tests_require=[ 'pytest >=2.1.3', 'tox', + 'ceph', ], entry_points = dict( console_scripts = [ diff --git a/src/ceph-volume/shell_tox.ini b/src/ceph-volume/shell_tox.ini index 5cd4606e4c5d..e5c390271344 100644 --- a/src/ceph-volume/shell_tox.ini +++ b/src/ceph-volume/shell_tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py35, py36 +envlist = py36, py3 skip_missing_interpreters = true [testenv] diff --git a/src/ceph-volume/tox.ini b/src/ceph-volume/tox.ini index dc66681d2c03..3f091afc78dd 100644 --- a/src/ceph-volume/tox.ini +++ b/src/ceph-volume/tox.ini @@ -1,11 +1,12 @@ [tox] -envlist = py27, py35, py36, flake8 +envlist = py36, py3, flake8 skip_missing_interpreters = true [testenv] deps= pytest mock +install_command=./tox_install_command.sh {opts} {packages} commands=py.test -v {posargs:ceph_volume/tests} --ignore=ceph_volume/tests/functional [testenv:flake8] diff --git a/src/ceph-volume/tox_install_command.sh b/src/ceph-volume/tox_install_command.sh new file mode 100755 index 000000000000..79343a4c2412 --- /dev/null +++ b/src/ceph-volume/tox_install_command.sh @@ -0,0 +1,3 @@ +#!/bin/bash +python -m pip install --editable="file://`pwd`/../python-common" +python -m pip install $@