Re: [Openstack] Hashing image files

2012-07-06 Thread Michael Still
On 03/07/12 02:33, Alexey Ababilov wrote:
 Hi, Michael!
 
 I am curious to know: is it necessary for nova to save images in file
 which names are sha1 hashes from image IDs (UUIDs)?
 
 Nova saves root image under its sha1 hash:
 https://github.com/openstack/nova/blob/master/nova/virt/libvirt/connection.py#L1214
 but it saves kernel and ramdisk under their original IDs:
 https://github.com/openstack/nova/blob/master/nova/virt/libvirt/connection.py#L1199
 https://github.com/openstack/nova/blob/master/nova/virt/libvirt/connection.py#L1206
 
 Is it a security measure?

That code pre-dates my involvement with openstack. I'm not really sure
why the hash is used, given its the hash of the id not of the contents
of the file.

We could rework all that code if you wanted, but it would be the third
or fourth rewrite in two releases, so I feel a little like we should let
it sit for a bit before changing it again.

Cheers,
Mikal

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


[Openstack] Hashing image files

2012-07-02 Thread Alexey Ababilov
Hi, Michael!

I am curious to know: is it necessary for nova to save images in file which
names are sha1 hashes from image IDs (UUIDs)?

Nova saves root image under its sha1 hash:
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/connection.py#L1214
but it saves kernel and ramdisk under their original IDs:
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/connection.py#L1199
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/connection.py#L1206

Is it a security measure?


-- 
Alessio Ababilov
Software Engineer
Grid Dynamics




-- 
Alessio Ababilov
Software Engineer
Grid Dynamics
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


[Openstack] Hashing image files

2012-06-25 Thread Alexey Ababilov
Hi!

I am curious to know: is it necessary for nova to save images in file which
names are hashes from image IDs (UUIDs)?

Nova saves root image under its sha1 hash:
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/connection.py#L1214
but it saves kernel and ramdisk under their original IDs:
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/connection.py#L1199
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/connection.py#L1206

Is it a security measures?


-- 
Alessio Ababilov
Software Engineer
Grid Dynamics
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp