gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gluster-devel] Glupy bugs: found the solution?


From: Justin Clift
Subject: Re: [Gluster-devel] Glupy bugs: found the solution?
Date: Sat, 26 Oct 2013 15:33:10 +0100

On Sun, 20 Oct 2013 23:08:41 -0400 (EDT)
Ramana Raja <address@hidden> wrote:

> Hi Justin,
> 
> Initially, I ran into the same problems as you did. The problem was that 
> Glupy's translators (negative, debug) were not importing Glupy's gluster 
> module, which is the actual python glue, but instead importing 
> Gluster-swift's gluster module :(. So all I had to do was to rename Glupy's 
> gluster module as glupy_gluster and the translators began to work.

Interestingly, I just got time to try this, and it did work:

  $ sudo gluster volume stop playground
  $ sudo systemctl stop glusterd
  $ sudo mv /usr/lib64/glusterfs/3git/xlator/features/glupy/gluster.py 
/usr/lib64/glusterfs/3git/xlator/features/glupy/gluster_glupy.py
  $ sudo rm /usr/lib64/glusterfs/3git/xlator/features/glupy/gluster.py?
  $ sudo systemctl start glusterd
  $ sudo gluster volume start playground

Then changed helloworld.py from:

  from gluster import *

to:

  from gluster_glupy import *

and Voila, the correct output appears when starting a volume
using the helloworld translator:

  Python xlator: Hello!


> Can you please check if your Glupy translators are importing the Glupy's 
> gluster module, and not something else?
> I did this as follows: 
> - Inserted pdb.set_trace() as the first line of negative.py
> - While Pdb-ing, ran "print sys.modules['gluster']" after "from gluster 
> import *" was executed

I haven't used Pdb before, instead I'm using PyCharm (an IDE).  I need
to figure out how to get the debugger in that working with Glupy
translators so I can find out what's being called from where.

Kind of suspecting it might be the libgfapi stuff (not Swift)
getting picked up on my system instead of Glupy.  But really,
I have no idea for sure and could easily be wrong.


> I'll send a patch to Gluster upstream renaming Glupy's gluster module as 
> gluster_glupy by citing module-name conflict issues.

I still feel this isn't the right approach.  Swift is just a component
of an external project, whereas Glupy is a component of our own project.

So, if anything needs renaming it should be the Swift component not
the Glupy one.

Does that make sense? :)

Regards and best wishes,

Justin Clift


> Hope your Glupy works.
> 
> 
> Thanks,
> 
> Ram 


-- 
Justin Clift <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]