remove paste configuration from the config files

Bug #815208 reported by Dan Prince on 2011-07-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Eoghan Glynn

Bug Description

Paste config files are cool and allow middleware adjustments, etc but really are more of an internal implementation detail than a config file.

Lets consider separating the paste configs into separate files.

Jay Pipes (jaypipes) wrote :

I'd be in favour of this. Would make upgrading the paste.deploy parts of the config setup easier in packaging, leading to less bugs like:

Changed in glance:
status: New → Confirmed
importance: Undecided → Low
status: Confirmed → Triaged
Jay Pipes (jaypipes) on 2011-09-15
Changed in glance:
milestone: none → essex-1
Jay Pipes (jaypipes) on 2011-11-02
Changed in glance:
milestone: essex-1 → essex-2
Jay Pipes (jaypipes) on 2011-12-06
Changed in glance:
milestone: essex-2 → essex-3
Eoghan Glynn (eglynn) wrote :

Here's a proposal for addressing this issue and also making it less likely that users will ever need to edit paste deploy config directly:

1. Strip out the paste deploy config from the main etc/glance-*.conf file into corresponding /usr/share/glance-*-paste.conf files

2. For each major middleware deployment option (minimal, with keystone, with caching, with keystone and caching etc.) define a seperate pipeline section, e.g.:

# minimal pipeline
pipeline = versionnegotiation context apiv1app

# pipeline with keystone enabled
pipeline = versionnegotiation authtoken auth-context apiv1app

# pipeline with caching enabled
pipeline = versionnegotiation context cache apiv1app

# ... etc.

3. Add a new config option, allowing the active pipeline to be selected in the primary config, e.g:

# etc/glance-api.conf
deployment_flavor = keystone

The idea being that most users need not be concerned that keystone support is in fact realized by traversing two separate filters, authtoken and auth-context. The default would be the most minimal/generic pipeline.

4. Before calling into wsgi.paste_deploy_app(), concatenate "-%(deployment_flavor)s" to the app_name so that correct pipeline is selected.


If there are no objections to the above, I'll go ahead and put together a patch implementing the change.

Changed in glance:
assignee: nobody → Eoghan Glynn (eglynn)
Jay Pipes (jaypipes) wrote :

Hi Eoghan!

So, I think that your proposal has some merit. However, I think that there are two things that need to be addressed (perhaps as separate bugs):

1) (this bug) Separating paste-deploy stuff from the regular configuration option files
2) Making it easier for newbies to understand the different ways to set up filters and middleware

I think fixing #1 would be a good first step. For the second, I could see using your solution here (using configuration option to driver the picking of a deployment pipeline), or instead having multiple well-commented paste.ini files in /etc that showed examples of configuring the pipelines for different needs.

For instance, etc/paste/ could contain:


Each showing examples of how to configure the filter and middleware pipelines?


Eoghan Glynn (eglynn) wrote :

Thanks for the feedback, Jay.

In terms of the approach to achieving objective #2, a key question would whether there's anything else in the *-paste.ini (other than the pipeline) that users may want to change.

If so, then your suggestion of providing well-commented stock paste.ini files would probably make more sense.

If on the other hand, the pipeline is the only aspect of the paste config likely to be modified by users, then perhaps completely encapsulating the paste config would give glance users a slightly gentler on-ramp?

Jay Pipes (jaypipes) wrote :

I don't think that there would be anything other than pipeline configuration in the *paste.ini files, no... but of course, we do want to give users the ability to configure their own custom middleware and whatnot, so if we did go the "configure with flags" route, we'd still want to keep the ability to override everything for advanced users.

Eoghan Glynn (eglynn) on 2012-01-16
Changed in glance:
status: Triaged → In Progress

Submitter: Jenkins
Branch: master

commit 14593a3b9691bdb6920c7fefe98d1f817495abb9
Author: Eoghan Glynn <email address hidden>
Date: Fri Jan 13 00:31:00 2012 +0000

    Split out paste deployment config from the core glance
    *.conf files into corresponding *-paste.ini files.

    Fixes LP #815208

    Change-Id: I5acb8488cc25bb3c7dd735c8c2b0fe62fcea8e5e

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-01-25
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in glance:
milestone: essex-3 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers