Hello Brad,

I manually deleted the py and pyc files under /usr/lib/python2.7/dist-packages 
and that seems to have worked. The ceph command does not complain right now. 
But I just noticed during the installation that there was an error installing 
some python packages:

TEST FAILED: 
/home/ssd/src/vanilla-ceph/ceph-install/lib/python2.7/site-packages/ does NOT 
support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /home/ssd/src/vanilla-ceph/ceph-install/lib/python2.7/site-packages/

and your PYTHONPATH environment variable currently contains:

    ' '
It does not seem to be causing any errors for basic testing but I will try to 
eliminate this error. FYI, the strace command gave the following output (after 
deleting ceph_argparse from /usr/lib/python2.7/dist-packages):

ssd@msl-lab-ads01:~/src/vanilla-ceph/log_files$ strace -eopen ceph 2>&1|grep 
ceph_argparse
open("/home/ssd/src/vanilla-ceph/ceph-install/bin/ceph_argparse.x86_64-linux-gnu.so",
 O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/ssd/src/vanilla-ceph/ceph-install/bin/ceph_argparse.so", O_RDONLY) 
= -1 ENOENT (No such file or directory)
open("/home/ssd/src/vanilla-ceph/ceph-install/bin/ceph_argparsemodule.so", 
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/ssd/src/vanilla-ceph/ceph-install/bin/ceph_argparse.py", O_RDONLY) 
= -1 ENOENT (No such file or directory)
open("/home/ssd/src/vanilla-ceph/ceph-install/bin/ceph_argparse.pyc", O_RDONLY) 
= -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/ceph_argparse.x86_64-linux-gnu.so", 
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/ceph_argparse.so", O_RDONLY) = -1 ENOENT 
(No such file or directory)
open("/usr/lib/python2.7/dist-packages/ceph_argparsemodule.so", O_RDONLY) = -1 
ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/ceph_argparse.py", O_RDONLY) = -1 ENOENT 
(No such file or directory)
open("/usr/lib/python2.7/dist-packages/ceph_argparse.pyc", O_RDONLY) = -1 
ENOENT (No such file or directory)
open("/home/ssd/src/vanilla-ceph/ceph-install/lib/python2.7/site-packages/ceph_argparse.x86_64-linux-gnu.so",
 O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/ssd/src/vanilla-ceph/ceph-install/lib/python2.7/site-packages/ceph_argparse.so",
 O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/ssd/src/vanilla-ceph/ceph-install/lib/python2.7/site-packages/ceph_argparsemodule.so",
 O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/ssd/src/vanilla-ceph/ceph-install/lib/python2.7/site-packages/ceph_argparse.py",
 O_RDONLY) = 3
open("/home/ssd/src/vanilla-ceph/ceph-install/lib/python2.7/site-packages/ceph_argparse.pyc",
 O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/ssd/src/vanilla-ceph/ceph-install/lib/python2.7/site-packages/ceph_argparse.pyc",
 O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0100644) = -1 EACCES (Permission denied)
^C

Thanks all, for your help!
Aakanksha

-----Original Message-----
From: Brad Hubbard [mailto:[email protected]] 
Sent: Wednesday, December 21, 2016 3:11 PM
To: Aakanksha Pudipeddi
Cc: John Spray; ceph-users
Subject: Re: [ceph-users] Ceph Import Error

What output do you get from the following?

$ strace -eopen ceph 2>&1|grep ceph_argparse

On Thu, Dec 22, 2016 at 8:55 AM, Aakanksha Pudipeddi <[email protected]> 
wrote:
> Hi John,
>
> Thanks for your response. Here is what I am setting them to:
>
> I am installing all binaries in the folder:
> ~/src/vanilla-ceph/ceph-install. So the folder contains the following 
> subfolders:
> ssd@msl-lab-ads01:~/src/vanilla-ceph/ceph-install$ ls bin  etc  
> include  lib  libexec  sbin  share
>
> ssd@msl-lab-ads01:~/src/vanilla-ceph/ceph-install$ ls 
> lib/python2.7/site-packages/
> ceph_argparse.py             ceph_rest_api.py            
> rbd-2.0.0-py2.7.egg-info
> ceph_daemon.py               ceph_volume_client.py       rbd.so
> cephfs-2.0.0-py2.7.egg-info  rados-2.0.0-py2.7.egg-info  
> rgw-2.0.0-py2.7.egg-info
> cephfs.so                    rados.so                    rgw.so
>
> Here are my paths:
>
> ssd@msl-lab-ads01:~$ echo $PATH
> /home/ssd/src/vanilla-ceph/ceph-install/bin:/home/ssd/src/vanilla-ceph
> /ceph-install/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
> sbin:/bin:/usr/games:/usr/local/games
> ssd@msl-lab-ads01:~$
> ssd@msl-lab-ads01:~$ echo $PYTHONPATH
> /home/ssd/src/vanilla-ceph/ceph-install/lib/python2.7/site-packages:
> ssd@msl-lab-ads01:~$
> ssd@msl-lab-ads01:~$ echo $LD_LIBRARY_PATH 
> /home/ssd/src/vanilla-ceph/ceph-install/lib:/home/ssd/src/vanilla-ceph
> /ceph-install/lib/x86_64-linux-gnu
>
> I just realized there is another ceph_argparse in my system in /usr/lib but 
> since my path is pointing to another folder, it should be looking at the 
> contents of that folder, right?
>
> ssd@msl-lab-ads01:/usr/lib/python2.7/dist-packages$ ls ceph
> ceph_argparse.py            ceph_deploy/                cephfs.py             
>       ceph_rest_api.py
> ceph_argparse.pyc           ceph_deploy-1.4.0.egg-info/ cephfs.pyc            
>       ceph_rest_api.pyc
>
> Thanks!
> Aakanksha
>
> -----Original Message-----
> From: John Spray [mailto:[email protected]]
> Sent: Wednesday, December 21, 2016 2:38 PM
> To: Aakanksha Pudipeddi
> Cc: ceph-users
> Subject: Re: [ceph-users] Ceph Import Error
>
> On Wed, Dec 21, 2016 at 6:39 PM, Aakanksha Pudipeddi 
> <[email protected]> wrote:
>> I mean setup a Ceph cluster after compiling from source and make install. I 
>> usually use the long form to setup the cluster. The mon setup is fine but 
>> when I create an OSD using ceph osd create or even check the status using 
>> ceph -s after the monitor is setup, I get this error. The PATH, 
>> LD_LIBRARY_PATH and PYTHONPATH have been set accordingly.
>
> You don't say *what* you set those variables to, so I can't form an opinion 
> on whether you've set them correctly.
>
> However, given that descsort_key is a relatively recent addition to 
> ceph_argparse, and your python exception shows it's finding the module but 
> not that particular symbol, it seems fairly likely that you have some other 
> ceph_argparse on your system that is being picked up instead of the one 
> you've just installed (i.e. your PYTHONPATH is wrong).
>
> John
>
>>
>> Thanks
>> Aakanksha
>> -----Original Message-----
>> From: John Spray [mailto:[email protected]]
>> Sent: Wednesday, December 21, 2016 2:24 AM
>> To: Aakanksha Pudipeddi
>> Cc: ceph-users
>> Subject: Re: [ceph-users] Ceph Import Error
>>
>> On Tue, Dec 20, 2016 at 11:32 PM, Aakanksha Pudipeddi 
>> <[email protected]> wrote:
>>> I am trying to setup kraken from source and I get an import error on 
>>> using the ceph command:
>>>
>>>
>>>
>>> Traceback (most recent call last):
>>>
>>>   File "/home/ssd/src/vanilla-ceph/ceph-install/bin/ceph", line 112, 
>>> in <module>
>>>
>>>     from ceph_argparse import \
>>>
>>> ImportError: cannot import name descsort_key
>>>
>>>
>>>
>>> The python path is correctly pointing to the location of 
>>> ceph_argparse but I want to know if it is a known error. On looking 
>>> online, I found that this is generally a result of circular 
>>> dependencies, although of what, I do not know yet. Any help would be 
>>> appreciated.
>>
>> Not sure what you mean by "setup from source" in this case -- are you trying 
>> to install Ceph system wide, or are you trying to run it out of your source 
>> tree?
>>
>> What is the overall command (including PYTHONPATH etc) that you are trying 
>> to run?
>>
>> John
>>
>>
>>>
>>>
>>> Thanks!
>>>
>>> Aakanksha
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> ceph-users mailing list
>>> [email protected]
>>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>>>
>>
>
> _______________________________________________
> ceph-users mailing list
> [email protected]
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



--
Cheers,
Brad

_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to