Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Keystoneclient max recursion depth exceeded

Hi all!

I am stuck on a strange problem since a day.

I am writing an openstack backup tool, which is using a self written library, where I instaniate several keystone and glance objects and invoke glance commands by using multiprocessing pools. _After_ the pool has finished to execute thus while all objects get destroyed i get a "maxiumum recursion depth exceeded":

Process PoolWorker-4:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in _bootstrap
    self.run()
    self.run()
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
    self._target(*self._args, **self._kwargs)
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python2.6/multiprocessing/pool.py", line 57, in worker
  File "/usr/lib64/python2.6/multiprocessing/pool.py", line 57, in worker
    task = get()
    task = get()
  File "/usr/lib64/python2.6/multiprocessing/queues.py", line 352, in get
  File "/usr/lib64/python2.6/multiprocessing/queues.py", line 352, in get
    return recv()
    return recv()
  File "/usr/lib/python2.6/site-packages/keystoneclient/openstack/common/apiclient/base.py", line 467, in __getattr__
  File "/usr/lib/python2.6/site-packages/keystoneclient/openstack/common/apiclient/base.py", line 467, in __getattr__
    if not self.is_loaded():
  File "/usr/lib/python2.6/site-packages/keystoneclient/openstack/common/apiclient/base.py", line 501, in is_loaded
    return self._loaded
  File "/usr/lib/python2.6/site-packages/keystoneclient/openstack/common/apiclient/base.py", line 467, in __getattr__
    if not self.is_loaded():
  File "/usr/lib/python2.6/site-packages/keystoneclient/openstack/common/apiclient/base.py", line 501, in is_loaded
    return self._loaded

[...]

The corresponding code can be found here https://github.com/isginf/openstack_tools/blob/master/openstack_lib.py

I know the bug happens in the function backup_glance(), but i dont have a clue why (guess it's due to keystoneclient being a singleton and using lazy loading) and how to solve it. I even tried to make glance and keystone objects global (whooot?!), but without success and the bug also gets triggered if there's no glance image available and therefore the backup_glance_image() function doesnt even get called... Any hint where I am blind?

I execute the code by running openstack_archiver.py <tenant_name>.

TIA && have a nice day!

Basti