[Openstack] Glance store question??

Joshua Harlow harlowja at yahoo-inc.com
Fri May 4 22:34:01 UTC 2012


Opened this blueprint,

I've started doing part of it, with the simple way of doing it (add a new config list that specifies the stores and import them at startup...)

Something like:

--- a/etc/glance-api.conf
+++ b/etc/glance-api.conf
@@ -5,10 +5,17 @@ verbose = True
 # Show debugging output in logs (sets DEBUG log level output)
 debug = False

-# Which backend store should Glance use by default is not specified
+# Which backend scheme should Glance use by default is not specified
 # in a request to add a new image to Glance? Default: 'file'
-# Available choices are 'file', 'swift', and 's3'
-default_store = file
+default_scheme = file
+
+# List of which stores (and schemes) are currently known to glance at
+# startup and the module+class used to construct that store.
+# Default: glance.store.filesystem.Store(filesystem; file)
+known_stores = glance.store.filesystem.Store(filesystem; file)
+         glance.store.http.Store(http; https),
+         glance.store.rbd.Store(rbd),
+         glance.store.s3.Store(s3; s3+http; s3+https)

And then the necessary changes in glance to read those and import those.

https://blueprints.launchpad.net/glance/+spec/import-dynamic-stores

On 5/3/12 11:06 AM, "Joshua Harlow" <harlowja at yahoo-inc.com> wrote:

Ok, although I wonder if a plug-in framework could benefit from just being generic enough to be used in either place?

I think he's focusing on the notification system right now (being more pluggable) there, so that be his scope for now. I'm willing to work together to make that more generic so that it isn't limited to just that though, this seems like one place that could be fixed easily either way (either via simple fix or via plugins).

On 5/3/12 11:02 AM, "Brian Waldon" <brian.waldon at rackspace.com> wrote:

He definitely is, but its scope is limited to Nova (for now?). The idea discussed below is something we could use without having to worry about a Glance plugin implementation. We can talk about plugins for Glance later.

Brian


On May 3, 2012, at 10:58 AM, Doug Hellmann wrote:

Andrew is doing some work on a plugin architecture. This sounds like another good application of that.

On Wed, May 2, 2012 at 7:01 PM, Joshua Harlow <harlowja at yahoo-inc.com> wrote:
Right, if there isn't that existing, then I think I might just make a blueprint out of that. I just wanted to check beforehand that I am doing this right, or if it already exists and I did it wrong...

Thx :-)


On 5/2/12 3:57 PM, "Brian Waldon" <brian.waldon at rackspace.com <http://brian.waldon@rackspace.com/> > wrote:

Jay might have a better answer, but as far as I know, yes. You could probably make the images stores truly pluggable (i.e. not needing to explicitly list them out) without much work.

Brian


On May 2, 2012, at 12:23 PM, Joshua Harlow wrote:

Glance store question??
Hi all,

I am making a y! specific backing store for glance and I was wondering if its really necessary to modify the following file to ensure that the code for that new store gets pulled in (or maybe I'm just doing it wrong).

diff --git a/glance/api/v1/images.py b/glance/api/v1/images.py
index 9839d2e..7c4f565 100644
--- a/glance/api/v1/images.py
+++ b/glance/api/v1/images.py
@@ -47,6 +47,7 @@ import glance.store.http
 import glance.store.rbd
 import glance.store.s3
 import glance.store.swift
+import glance.store.SUPERAWESOMEYSTORE
 from glance.store import (get_from_backend,
                           get_size_from_backend,
                           schedule_delete_from_backend,

Is there another way to make that happen so that it gets registered with glance besides either modifying that file or having a patch which will modify it upon installation (ie an RPM patch)?

Thx!

-Josh
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack at lists.launchpad.net <http://openstack@lists.launchpad.net/>
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp



_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack at lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120504/112be955/attachment.html>


More information about the Openstack mailing list