You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
In cinder_modwsgi.py, cinder.flags is used to handle arguments but flags no longer exists; as such, the supplied cinder_modwsgi.py file will not work for Cinder on the Icehouse release.
It seems that flags has been removed in favor of using oslo.config. However, as the transition to using oslo.config is not complete, cinder.common.config is actually a wrapper around oslo.config that tries to emulate gflags. More information can be found in cinder/common/config.py and this commit.
In the meantime I've tried using this as a wsgi script:
importsysfromcinder.openstack.commonimportlogasloggingfromcinder.commonimportconfigfrompasteimportdeployconfig_files= ['/etc/cinder/api-paste.ini', '/etc/cinder/cinder.conf']
# The following won't work yet because Cinder doesn't actually have full# oslo.conf support but rather has a wrapper that emulates flags# config.parse_args([], default_config_files=config_files)LOG=logging.getLogger(__name__)
logging.setup("cinder")
paste_conf='/etc/cinder/api-paste.ini'application=deploy.loadapp('config:%s'%paste_conf, name="osapi_volume")
However, it results in the following stack trace:
2014-07-22 20:14:33.978 29996 CRITICAL cinder [-] AssertionError
2014-07-22 20:14:33.978 29996 TRACE cinder Traceback (most recent call last):
2014-07-22 20:14:33.978 29996 TRACE cinder File "cinder-muraiki.wsgi", line 14, in <module>
2014-07-22 20:14:33.978 29996 TRACE cinder application = deploy.loadapp('config:%s' % conf, name=name)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", l
ine 247, in loadapp
2014-07-22 20:14:33.978 29996 TRACE cinder return loadobj(APP, uri, name=name, **kw)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", l
ine 272, in loadobj
2014-07-22 20:14:33.978 29996 TRACE cinder return context.create()
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", l
ine 710, in create
2014-07-22 20:14:33.978 29996 TRACE cinder return self.object_type.invoke(self)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", l
ine 144, in invoke
2014-07-22 20:14:33.978 29996 TRACE cinder **context.local_conf)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line
55, in fix_call
2014-07-22 20:14:33.978 29996 TRACE cinder val = callable(*args, **kw)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/opt/stack/cinder/cinder/api/__init__.py", line 30, in root_a
pp_factory
2014-07-22 20:14:33.978 29996 TRACE cinder return paste.urlmap.urlmap_factory(loader, global_conf, **local_c
onf)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 28, i
n urlmap_factory
2014-07-22 20:14:33.978 29996 TRACE cinder app = loader.get_app(app_name, global_conf=global_conf)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", l
ine 350, in get_app
2014-07-22 20:14:33.978 29996 TRACE cinder name=name, global_conf=global_conf).create()
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", l
ine 710, in create
2014-07-22 20:14:33.978 29996 TRACE cinder return self.object_type.invoke(self)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", l
ine 144, in invoke
2014-07-22 20:14:33.978 29996 TRACE cinder **context.local_conf)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line
55, in fix_call
2014-07-22 20:14:33.978 29996 TRACE cinder val = callable(*args, **kw)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/opt/stack/cinder/cinder/api/middleware/auth.py", line 55, in
pipeline_factory
2014-07-22 20:14:33.978 29996 TRACE cinder app = loader.get_app(pipeline[-1])
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", l
ine 350, in get_app
2014-07-22 20:14:33.978 29996 TRACE cinder name=name, global_conf=global_conf).create()
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", l
ine 710, in create
2014-07-22 20:14:33.978 29996 TRACE cinder return self.object_type.invoke(self)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", l
ine 146, in invoke
2014-07-22 20:14:33.978 29996 TRACE cinder return fix_call(context.object, context.global_conf, **context.lo
cal_conf)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line
55, in fix_call
2014-07-22 20:14:33.978 29996 TRACE cinder val = callable(*args, **kw)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/opt/stack/cinder/cinder/api/openstack/__init__.py", line 71,
in factory
2014-07-22 20:14:33.978 29996 TRACE cinder return cls()
2014-07-22 20:14:33.978 29996 TRACE cinder File "/opt/stack/cinder/cinder/api/openstack/__init__.py", line 82,
in __init__
2014-07-22 20:14:33.978 29996 TRACE cinder self._setup_routes(mapper, ext_mgr)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/opt/stack/cinder/cinder/api/v2/router.py", line 49, in _setu
p_routes
2014-07-22 20:14:33.978 29996 TRACE cinder self.resources['volumes'] = volumes.create_resource(ext_mgr)
2014-07-22 20:14:33.978 29996 TRACE cinder File "/opt/stack/cinder/cinder/api/v2/volumes.py", line 420, in cre
ate_resource
2014-07-22 20:14:33.978 29996 TRACE cinder return wsgi.Resource(VolumeController(ext_mgr))
2014-07-22 20:14:33.978 29996 TRACE cinder File "/opt/stack/cinder/cinder/api/v2/volumes.py", line 157, in __i
nit__
2014-07-22 20:14:33.978 29996 TRACE cinder self.volume_api = cinder_volume.API()
2014-07-22 20:14:33.978 29996 TRACE cinder File "/opt/stack/cinder/cinder/volume/api.py", line 106, in __init_
_
2014-07-22 20:14:33.978 29996 TRACE cinder self.scheduler_rpcapi = scheduler_rpcapi.SchedulerAPI()
2014-07-22 20:14:33.978 29996 TRACE cinder File "/opt/stack/cinder/cinder/scheduler/rpcapi.py", line 49, in __
init__
2014-07-22 20:14:33.978 29996 TRACE cinder self.client = rpc.get_client(target, version_cap='1.5')
2014-07-22 20:14:33.978 29996 TRACE cinder File "/opt/stack/cinder/cinder/rpc.py", line 130, in get_client
2014-07-22 20:14:33.978 29996 TRACE cinder assert TRANSPORT is not None
2014-07-22 20:14:33.978 29996 TRACE cinder AssertionError
2014-07-22 20:14:33.978 29996 TRACE cinder
This is probably happening because the defaults from config.py are being used. As such, the question is how do we get our settings from /etc/cinder/cinder.conf into Cinder?
I'm not terribly familiar with Cinder and Oslo, nor am I using Chef, but this is one of the few (albeit not currently working) examples of using Cinder with mod_wsgi I could find. Thank you!
The text was updated successfully, but these errors were encountered:
In cinder_modwsgi.py, cinder.flags is used to handle arguments but flags no longer exists; as such, the supplied cinder_modwsgi.py file will not work for Cinder on the Icehouse release.
It seems that flags has been removed in favor of using oslo.config. However, as the transition to using oslo.config is not complete, cinder.common.config is actually a wrapper around oslo.config that tries to emulate gflags. More information can be found in cinder/common/config.py and this commit.
In the meantime I've tried using this as a wsgi script:
However, it results in the following stack trace:
This is probably happening because the defaults from
config.py
are being used. As such, the question is how do we get our settings from/etc/cinder/cinder.conf
into Cinder?I'm not terribly familiar with Cinder and Oslo, nor am I using Chef, but this is one of the few (albeit not currently working) examples of using Cinder with mod_wsgi I could find. Thank you!
The text was updated successfully, but these errors were encountered: