]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: dependency on python-ceph-common 36558/head
authorJan Fajerski <jfajerski@suse.com>
Thu, 30 Jul 2020 09:46:00 +0000 (11:46 +0200)
committerJan Fajerski <jfajerski@suse.com>
Tue, 11 Aug 2020 07:56:31 +0000 (09:56 +0200)
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 <jfajerski@suse.com>
(cherry picked from commit cb432fe41d4ea8cb71aa592e0727d2da1978121f)

ceph.spec.in
src/ceph-volume/ceph_volume/tests/api/test_lvm.py
src/ceph-volume/setup.py
src/ceph-volume/shell_tox.ini
src/ceph-volume/tox.ini
src/ceph-volume/tox_install_command.sh [new file with mode: 0755]

index 70f4009de8f1abb33335ce7af705e8fb86d0482b..dcc341cbf5919fc4a268f9139f9c78ff3cf32a96 100644 (file)
@@ -750,6 +750,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
index d75920bd687824844a64b7aaf3e16436305dd2b5..3bb2e977f00c8587b7edd6637b3c6b7e3713d0e9 100644 (file)
@@ -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):
index a9fbdf8985b1d1d14baf5e9273faf2b5b9348883..44a0d0e468997f67869b29d4fa6cb37c5f7c1e2b 100644 (file)
@@ -20,6 +20,7 @@ setup(
     tests_require=[
         'pytest >=2.1.3',
         'tox',
+        'ceph',
     ],
     entry_points = dict(
         console_scripts = [
index 5cd4606e4c5d7c78bca34132ffdf6f69399336da..e5c390271344bc591bc59fed54dc26e81f35f8fa 100644 (file)
@@ -1,5 +1,5 @@
 [tox]
-envlist = py27, py35, py36
+envlist = py36, py3
 skip_missing_interpreters = true
 
 [testenv]
index dc66681d2c0368ee621adda97c27f37dae370743..3f091afc78dd6805e85ad43d46997bda6b34936a 100644 (file)
@@ -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 (executable)
index 0000000..79343a4
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+python -m pip install --editable="file://`pwd`/../python-common"
+python -m pip install $@