The s3 image service isn't meant to be specified in the flag. It wraps the other image services for use by the ec2 api. The ec2 api will always use the s3 image service. If you specify local image service using the flag it will wrap the local image service. If you specify the glance image service, it will wrap glance. On Mar 19, 2011, at 7:27 PM, Lorin Hochstein wrote: > 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.BaseImageService): > def __init__(self, service=None, *args, **kwargs): > if service == None: > service = utils.import_object(FLAGS.image_service) > > > The problem can be reproduced with the following Python code. > > from nova import flags > flags.FLAGS.image_service = 'nova.image.s3.S3ImageService' > import nova.image.s3 > s3 = nova.image.s3.S3ImageService() > > -- > You received this bug notification because you are a member of Nova Bug > Team, which is subscribed to OpenStack Compute (nova). > https://bugs.launchpad.net/bugs/738371 > > Title: > nova-api throws an exception when using S3 image service > > Status in OpenStack Compute (Nova): > New > > Bug description: > Version: revision 834 (installed from packages on Lucid) > > When configured to use S3 image service > (--image_service=nova.image.s3.S3ImageService), nova-api throws an > exception: > > 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-api", line 60, in > (nova): TRACE: service = service.serve_wsgi(service.ApiService) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 306, in serve_wsgi > (nova): TRACE: service.start() > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 240, in start > (nova): TRACE: self.wsgi_app = _run_wsgi(self.conf, self.apis) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 321, in _run_wsgi > (nova): TRACE: app = wsgi.load_paste_app(paste_config_file, api) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/wsgi.py", line 559, in load_paste_app > (nova): TRACE: app = deploy.loadapp("config:%s" % filename, name=appname) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 204, in loadapp > (nova): TRACE: return loadobj(APP, uri, name=name, **kw) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 225, in loadobj > (nova): TRACE: return context.create() > (nova): TRACE: File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 625, in create > (nova): TRACE: return self.object_type.invoke(self) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 108, in invoke > (nova): TRACE: **context.local_conf) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/paste/deploy/util/fixtypeerror.py", line 57, in fix_call > (nova): TRACE: val = callable(*args, **kw) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/paste/urlmap.py", line 25, in urlmap_factory > (nova): TRACE: app = loader.get_app(app_name, global_conf=global_conf) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 297, in get_app > (nova): TRACE: name=name, global_conf=global_conf).create() > (nova): TRACE: File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 625, in create > (nova): TRACE: return self.object_type.invoke(self) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/paste/deploy/loadwsgi.py", line 168, in invoke > (nova): TRACE: app = filter(app) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/wsgi.py", line 212, in _factory > (nova): TRACE: return cls(app, **local_config) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/ec2/__init__.py", line 191, in __init__ > (nova): TRACE: self.controller = utils.import_class(controller)() > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/ec2/cloud.py", line 84, in __init__ > (nova): TRACE: self.image_service = s3.S3ImageService() > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/image/s3.py", line 50, in __init__ > (nova): TRACE: service = utils.import_object(FLAGS.image_service) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/utils.py", line 75, in import_object > (nova): TRACE: return cls() > ... > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/image/s3.py", line 50, in __init__ > (nova): TRACE: service = utils.import_object(FLAGS.image_service) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/flags.py", line 139, in __getattr__ > (nova): TRACE: val = gflags.FlagValues.__getattr__(self, name) > (nova): TRACE: File "/usr/lib/python2.6/dist-packages/gflags.py", line 808, in __getattr__ > (nova): TRACE: fl = self.FlagDict() > (nova): TRACE: RuntimeError: maximum recursion depth exceeded