On Sun, 2019-03-17 at 09:39 +0530, Milind Changire wrote:
I could run cephfs-shell without 'make
install'.
After running vstart, cd to build directory and run:
$ LD_LIBRARY_PATH=$PWD/lib python3.7 ../src/tools/cephfs/cephfs-shell --config ceph.conf
The ceph.conf is generated when vstart is executed. I guess you'd know this part.
On Sat, Mar 16, 2019 at 4:40 PM Jeff Layton <jlayton(a)redhat.com> wrote:
I need to do a bit of testing with cephfs and
would like to avoid having
to use FUSE or write C calls into libcephfs. cephfs-shell seems perfect
for this, but I haven't quite figured out how to run it out of the build
directory.
Is there a way to run cephfs-shell from a ceph build directory (i.e. w/o
make installing it)? Are there env vars that can be set to make it find
the right bits in the right places?
Thanks,
--
Jeff Layton <jlayton(a)redhat.com>
_______________________________________________
ceph-fs mailing list -- ceph-fs(a)ceph.io
To unsubscribe send an email to ceph-fs-leave(a)ceph.io
Thanks Milind,
Hmm...that didn't work for me:
$ LD_LIBRARY_PATH=$PWD/lib python3.7 ../src/tools/cephfs/cephfs-shell --config ceph.conf
Traceback (most recent call last):
File "../src/tools/cephfs/cephfs-shell", line 9, in <module>
import cephfs as libcephfs
ModuleNotFoundError: No module named 'cephfs'
I'm guessing maybe you have a python3-cephfs module installed on your
machine? In any case I tried this and it got me a little closer:
$ PYTHONPATH=../src/pybind LD_LIBRARY_PATH=$PWD/lib python3.7
../src/tools/cephfs/cephfs-shell --config ceph.conf
Traceback (most recent call last):
File "../src/tools/cephfs/cephfs-shell", line 974, in <module>
setup_cephfs(config_file)
File "../src/tools/cephfs/cephfs-shell", line 59, in setup_cephfs
cephfs = libcephfs.LibCephFS(conffile=config_file)
AttributeError: module 'cephfs' has no attribute 'LibCephFS'
...but I think it didn't import the module as expected. I'll keep
tinkering with it tomorrow.
Cheers,
--
Jeff Layton <jlayton(a)redhat.com>