Ask Your Question
0

Keystoneclient max recursion depth exceeded

asked 2014-06-25 09:04:26 -0500

Bastian Ballmann gravatar image

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 (https://github.com/isginf/openstack_t...)

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-26 04:00:47 -0500

Bastian Ballmann gravatar image

To answer my own question it's not a good idea to use the tenant object as parameter of a function used in multiprocessing pool. Every keystone object such as tenant, user, role inherits from base.Resource, which implements the lazy loading stuff that leads to the above exception.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2014-06-25 09:04:26 -0500

Seen: 162 times

Last updated: Jun 26 '14