Code review comment for lp://qastaging/~yamahata/glance/lp802893

Revision history for this message
Jay Pipes (jaypipes) wrote :

> On Tue, Jun 28, 2011 at 02:48:38PM -0000, Brian Waldon wrote:
> > This is an interesting idea, but I'm a little hesitant to call this a bug.
> Keeping metadata simple was an explicit design design. I think this should
> probably be filed as a blueprint targeted at diablo-3, assuming this is
> something we want. Thoughts, Jay?
>
> Fair enough, I'll file a blueprint and let's start discussion.

Cool. Agreed it's big enough to be a blueprint discussion.

> I think the discussion involves both nova and glance. So I'll also start
> a discussion thread on openstack devel ml in order to draw attention from
> nova developer. So far I've thought it's Glance issue so that I created
> this patch to Glance. Other option would be to change nova metadata handling.
>
> Jay, any comments?

I think it's a good feature to add, but I'd almost prefer to add it as new middleware on the registry, or even as an extension? That way you could do something like:

PUT /images/<ID>/container-format

with a body of something like:

'format': {
  'mappings': [
                   {'device_name': '/dev/sda1',
                    'snapshot_id': 0x12345678,
                    'delete_on_termination': False},
                   {'device_name': '/dev/sda2',
                    'no_device': True}
  ],
  'block_device_mapping': [
                   {'virtual': 'ami', 'device': 'sda1'},
                   {'virtual': 'root', 'device': '/dev/sda1'},
                   {'virtual': 'swap', 'device': 'sdb1'},
                   {'virtual': 'swap', 'device': 'sdb2'},
                   {'virtual': 'ephemeral0', 'device': 'sdc1'},
                   {'virtual': 'ephemeral1', 'device': 'sdc2'}
  ],
}

And then, the extension/middleware can store specific information about the container in separate tables in the database that can be queried using a more specific API than the very limited custom key/value properties we currently have.

Thoughts?
-jay

« Back to merge proposal