Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow file engine to be used with other engines #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tgerdes
Copy link

@tgerdes tgerdes commented May 30, 2017

A cloud should be allowed to enable file and rbd or swift backends.
This check prevented other backends from being enabled if file was in
the list.

A cloud should be allowed to enable file and rbd or swift backends.
This check prevented other backends from being enabled if file was in
the list.
@pupapaik
Copy link

I disagree, because in the past I needed to have file,http to run it properly.

@tgerdes
Copy link
Author

tgerdes commented Jun 13, 2017

How do you suggest me enabling

storage_engines: rbd,file,http

In my cloud then?

This bug prevents me from doing that, the presence of file in my pillar removes rbd from the generated config

@tgerdes
Copy link
Author

tgerdes commented Jun 22, 2017

Perhaps there confusion here about backwards compatibility. This patch preserves the previous behavior while making the option more flexible.

In the template, storage_engines is a python list of the pillar data server.storage.engine split on commas. (see https://github.com/tgerdes/salt-formula-glance/blob/f8b4128c275c7c5a7cf77cb315becd228d70f136/glance/files/mitaka/glance-api.conf.Debian#L2 )

With this patch, If a user specifies a pillar of:

glance:
    server:
        storage:
            engine: file

The generated template will be

default_store = file
stores = file,http

A pillar of

glance:
    server:
        storage:
            engine: "rbd,file,http"

Generates

default_store = rbd
stores = rbd,file,http

With this new scheme, a user that is using a comma separated string to specify multiple engines is expected to include all required engines (in the case where "file" implies "http" should be enabled).

This patch does not accommodate any way to generate a config that sets

default_store = file
stores = file

Before this patch, the pillar

A pillar of

glance:
    server:
        storage:
            engine: "rbd,swift,file,http"

would generate the config:

default_store = file
stores = file,http

Which is missing the user requested setting.

@tgerdes
Copy link
Author

tgerdes commented Jul 14, 2017

Adding @samos123 for additional review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants