Some thoughts on solutions to this bug: <clayg> jaypipes: I ran into that error as well, work around was of course adding the new context middleware * dolphm has quit (Remote host closed the connection) <jaypipes> clayg: yup... actually, dprince had suggested separating config files from paste.deploy to make things like this easier to upgrade properly... not sure I completely agree with that, though. <clayg> but I wonder why not just if not hasattr(req, 'context'): req.context = DefaultAdminContext <jaypipes> clayg: I added a blueprint to the openstack-ci project for this general problem... https://blueprints.launchpad.net/openstack-ci/+spec/glance-upgrade <clayg> i don't know splitting your paste config from the app config, paste deploy .ini configs are pretty standard these days <clayg> i don't really see it as an upgrade problem as much as a "required middleware" problem <clayg> why should the app assume that something upstream added a non-standard attribute to the request? <jaypipes> clayg: I gather you are suggesting the best way would to have not created required middleware :) <clayg> I just mean the app could make a default decision if context attribute isn't there <jaypipes> clayg: ya, I hear you. <clayg> ok <jaypipes> clayg: or even add it to wsgi.environ['context'] instead, making it environ.get('context')'able... <jaypipes> clayg: which I think may have been how nova implemented it... anyways, point taken :) <clayg> idk, namespacing problems apply either way, when you add an attribute to a request webob's just putting it in environ['addhoc-attrs']['attr_name'] <creiht> wsgi.environ['glance.context'] <creiht> :) <creiht> is typical for that type of stuff <jaypipes> creiht: ah, yes, thx <clayg> I presonally always liked adding a attribute with the name of the app - which itself is a dict i.e. req.glance.get('context', default_context)
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/814981 Title: glance-api fails on image delivery: AttributeError: context To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/814981/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
