[openstack-dev] [metering] flask or openstack style wsgi.py

Mark McLoughlin markmc at redhat.com
Mon Sep 10 12:49:48 UTC 2012


On Mon, 2012-09-10 at 21:58 +1000, Angus Salkeld wrote:
> On 10/09/12 07:23 -0400, Doug Hellmann wrote:
> >
> >
> >On Sep 10, 2012, at 5:23 AM, Julien Danjou <julien at danjou.info> wrote:
> >
> >> On Mon, Sep 10 2012, Angus Salkeld wrote:
> >>
> >>> How do you guys feel about me changing flask to a more openstack style
> >>> wsgi implementation? So the suggestion is not flask sucks, but it is not
> >>> used anywhere else. We should really use it everywhere or nowhere. I think
> >>> the consistency across the openstack projects is really nice for people
> >>> that work across projects.
> >>
> >> Sure, one of our principles is to blend with others OS projects, so
> >> obviously Flask choice can seem weird.
> >>
> >> But actually, IIRC, I've discussed this with Doug, and we decided to go
> >> with Flask because it seemed that WSGI was a dead-end, and that other
> >> projects would be moving away from it. So what's the roadmap for other
> >> projects about this?
> >
> >Not WSGI, paste.deploy. At the last summit we discussed dropping paste because it does not have python 3 support. No timetable was set.
> >
> >I pushed the use of flask in ceilometer because when I looked at the WSGI libraries in nova they were not available in common and I didn't feel I had time to figure out which bits needed to be extracted to copy them into our project. I also found them to be more complex than I wanted to deal with, since I didn't find any tutorials for using them.
> Yea, I was going to start on this blueprint soon:
> https://blueprints.launchpad.net/openstack-common/+spec/wsgi-common
> but if this is the case (moving away from wsgi.py) then this probably needs to be
> scrapped.
> Is there a wiki page/blueprint somewhere that explains this decision?

Summary of ceilometer's decision to use Flask seems to be:

  - some people are advocating for dropping paste.deploy

  - the WSGI code in Nova is complex and not in openstack-common

  - let's use Flask instead

I haven't noticed anyone actually making progress towards dropping
paste.deploy beyond this:


As for WSGI support in openstack-common, I basically considered the
current code in openstack-common to be dead since no other projects use
it even though most projects have very similar code. Angus has done some
work bring it back to life, so hopefully we'll see a project or two
switched over to using it soon.

I don't have any strong opinion on this approach vs Flask except that
the wsgi-common approach looks more like something which we can have
most projects adopt sooner.


More information about the OpenStack-dev mailing list