It looks like the keystone middleware for ec2 is not up to date with the latest changes on FLAGS that happened in Nova.
Feb 2 11:47:45 os-vpx-E2-4C-E7-07-48-69 nova-api CRITICAL 'module' object has no attribute 'DEFINE_string'
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/nova-api", line 51, in <module>
(nova): TRACE: servers.append(service.WSGIService(api))
(nova): TRACE: File "/usr/lib/python2.6/site-packages/nova/service.py", line 328, in __init__
(nova): TRACE: self.app = self.loader.load_app(name)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/nova/wsgi.py", line 388, in load_app
(nova): TRACE: return deploy.loadapp("config:%s" % self.config_path, name=name)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadapp
(nova): TRACE: return loadobj(APP, uri, name=name, **kw)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 272, in loadobj
(nova): TRACE: return context.create()
(nova): TRACE: File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 710, in create
(nova): TRACE: return self.object_type.invoke(self)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 144, in invoke
(nova): TRACE: **context.local_conf)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py", line 56, in fix_call
(nova): TRACE: val = callable(*args, **kw)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/Paste-1.7.5.1-py2.6.egg/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/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 350, in get_app
(nova): TRACE: name=name, global_conf=global_conf).create()
(nova): TRACE: File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 362, in app_context
(nova): TRACE: APP, name=name, global_conf=global_conf)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 450, in get_context
(nova): TRACE: global_additions=global_additions)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 562, in _pipeline_app_context
(nova): TRACE: for name in pipeline[:-1]]
(nova): TRACE: File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 458, in get_context
(nova): TRACE: section)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 517, in _context_from_explicit
(nova): TRACE: value = import_string(found_expr)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 22, in import_string
(nova): TRACE: return pkg_resources.EntryPoint.parse("x=" + s).load(False)
(nova): TRACE: File "/usr/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 1948, in load
(nova): TRACE: entry = __import__(self.module_name, globals(),globals(), ['__name__'])
(nova): TRACE: File "/usr/lib/python2.6/site-packages/keystone/middleware/ec2_token.py", line 36, in <module>
(nova): TRACE: flags.DEFINE_string('keystone_ec2_url',
(nova): TRACE: AttributeError: 'module' object has no attribute 'DEFINE_string'
that turns out to be a misconfiguration in the ini file.
However, is this middleware meant to be here anymore?