nova-api throws an exception when using S3 image service
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Version: revision 834 (installed from packages on Lucid)
When configured to use S3 image service (--image_
2011-03-19 11:43:24,044 CRITICAL nova [-] maximum recursion depth exceeded
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/
(nova): TRACE: service = service.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: service.start()
(nova): TRACE: File "/usr/lib/
(nova): TRACE: self.wsgi_app = _run_wsgi(
(nova): TRACE: File "/usr/lib/
(nova): TRACE: app = wsgi.load_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: app = deploy.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return loadobj(APP, uri, name=name, **kw)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return context.create()
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return self.object_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: **context.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: val = callable(*args, **kw)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: app = loader.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: name=name, global_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return self.object_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: app = filter(app)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return cls(app, **local_config)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: self.controller = utils.import_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: self.image_service = s3.S3ImageService()
(nova): TRACE: File "/usr/lib/
(nova): TRACE: service = utils.import_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return cls()
...
(nova): TRACE: File "/usr/lib/
(nova): TRACE: service = utils.import_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: val = gflags.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: fl = self.FlagDict()
(nova): TRACE: RuntimeError: maximum recursion depth exceeded
The problem seems to be in the S3ImageService constructor. If the image_service flag points to the S3ImageService, then the constructor will create an S3ImageService object:
class S3ImageService( service. BaseImageServic e): object( FLAGS.image_ service)
def __init__(self, service=None, *args, **kwargs):
if service == None:
service = utils.import_
The problem can be reproduced with the following Python code.
from nova import flags image_service = 'nova.image. s3.S3ImageServi ce' s3.S3ImageServi ce()
flags.FLAGS.
import nova.image.s3
s3 = nova.image.