On Fri, May 4, 2018 at 4:00 PM, Rishabh Dave <ridave@xxxxxxxxxx> wrote: > On 2 May 2018 at 22:36, Patrick Donnelly <pdonnell@xxxxxxxxxx> wrote: >> >> It's not necessary but it shouldn't be much more work*. I'd recommend >> updating vstart_runner.py too. >> >> * You should be able to run the Python payloads in >> test_volume_client.py manually. > > I am trying to run the payloads manually by copying it (and the > standard header and footers) in a file[1] for convenience in > src/pybind/ so that ceph_volume_client.py and rest of modules are > available immediately. However, on running the test, I get the > following error - > > Traceback (most recent call last): > File "test.py", line 1, in <module> > from ceph_volume_client import CephFSVolumeClient, VolumePath > File "/home/centos/repos/ceph/src/pybind/test/ceph_volume_client.py", > line 22, in <module> > import cephfs > ImportError: No module named 'cephfs' > > After the adding > "/home/centos/repos/ceph/build/lib/cython_modules/lib.3/" to > PYTHONPATH env. variable, I get a similar error message - > > Traceback (most recent call last): > File "test.py", line 1, in <module> > from ceph_volume_client import CephFSVolumeClient, VolumePath > File "/home/centos/repos/ceph/src/pybind/test/ceph_volume_client.py", > line 22, in <module> > import cephfs > ImportError: libcephfs.so.2: cannot open shared object file: No such > file or directory > > libcephfs.so.2 resides in ceph/build/lib/libcephfs.so.2 but updating > PYTHONPATH has no impact. How do I proceed? Because the python libraries are importing the equivalent C libraries, you also need to update LD_LIBRARY_PATH My (python 2) prefix looks like this: LD_LIBRARY_PATH=~/ceph/build/lib/ PYTHONPATH=~/ceph/build/lib/cython_modules/lib.2/ John > And how are the tests in test_volume_client.py executed using python2? > Doing "$python2 ../qa/tasks/vstart_runner.py --interactive --create > tasks.cephfs.test_volume_client" hasn't worked for me either. > > [1] https://github.com/rishabh-d-dave/ceph/blob/py2-to-py3/src/pybind/test.py > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html