Re: [openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-07 Thread Mike Perez
On 22:55 Wed 02 Apr , Mike Perez wrote:
 On 02:58 Thu 03 Apr , Bohai (ricky) wrote:
  Hi,
  
  When I use an image to create a cinder volume, I found image's metadata is 
  saved into DB table volume_glance_metadata.
  
  But when I use  os-volume_upload_image to create image from cinder 
  volume, the metadata in volume_glance_metadata 
  is not setted back to the newly created image. I can't found the reason for 
  this.
  Anyone can give me a hint?
  
  I am a newbie for cinder and i apologize if I am missing something very 
  obvious.
  
  Best regards to you.
  Ricky
 
 Hi Ricky,
 
 The glance metadata is currently only stored for creating new volumes, new
 snapshots or backups. It's used for in the volume creation to know if the
 volume is bootable.
 
 -- 
 Mike Perez

Correction to myself, the glance metadata is no longer used for determining if
a volume is bootable. 

https://github.com/openstack/cinder/commit/c8f814569d07544734f10f134e146ce981639e07

-- 
Mike Perez

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-06 Thread Duncan Thomas
Mike

Glance metadata gets used for billing tags, among things, that we
would like to stay as attached to a volume as possible, as another
example. Windows images use this - which is why cinder copies all of
the glance metadata in the first place, rather than just a bootable
flag.

Apparently protected properties (glance metadata items that are
immutable once set) won't cause a problem here since we will be
setting them on upload, which is allowed.


On 3 April 2014 18:19, Mike Perez thin...@gmail.com wrote:
 On 18:37 Thu 03 Apr , Lingxian Kong wrote:
 Thanks Duncan for your answer.

 I am very interested in making a contribution towards this effort, but
 what to do next? Waiting for approving for this blueprint? Or see
 others' opinions on this before we putting more efforts in achieving
 this? I just want to make sure that we could handle other people's use
 cases and not just our own.

 What use case is that exactly? I mentioned earlier the original purpose was 
 for
 knowing if something was bootable. I'm curious on how else this is being used.

 --
 Mike Perez

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



-- 
Duncan Thomas

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-06 Thread Duncan Thomas
My advice is two-fold:
 - No need to wait for the blueprint to be approved before submitting
a review - put a review up and let people see the details, then
respond to the discussion as necessary

 - Drop into the Wednesday (16:00 UTC) IRC meeting for Cinder - most
if not all of the core team are usually on and we can answer any
specific questions then. The Agenda is on the wiki if you want to add
to it. All welcome


On 3 April 2014 11:37, Lingxian Kong anlin.k...@gmail.com wrote:
 Thanks Duncan for your answer.

 I am very interested in making a contribution towards this effort, but
 what to do next? Waiting for approving for this blueprint? Or see
 others' opinions on this before we putting more efforts in achieving
 this? I just want to make sure that we could handle other people's use
 cases and not just our own.




 2014-04-03 18:12 GMT+08:00 Duncan Thomas duncan.tho...@gmail.com:

 On 3 April 2014 08:28, 王宏 w.wangho...@gmail.com wrote:
  I agree. Actually, I already have a BP on it:
  https://blueprints.launchpad.net/cinder/+spec/restore-image.
  I am happy for any suggestion.

 Needs a little thought since container_format and some other fields
 will need to be regenerated (e.g. we can source for a QCOW image, but
 we always upload raw), but as long as these are dealt with it seems
 like a useful feature

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




 --
 ---
 Lingxian Kong
 Huawei Technologies Co.,LTD.
 IT Product Line CloudOS PDU
 China, Xi'an
 Mobile: +86-18602962792
 Email: konglingx...@huawei.com; anlin.k...@gmail.com

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




-- 
Duncan Thomas

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-03 Thread Bohai (ricky)
Hi Mike,

Thanks for your time and your answer.

Whether it's better to provide an option for the user to make a image which 
inherit the volume stored glance metadata
by os-volume_upload_image  ?
Maybe it's a convenience for the user in some cases.

Best regards to you.
Ricky

 -Original Message-
 From: Mike Perez [mailto:thin...@gmail.com]
 Sent: Thursday, April 03, 2014 1:55 PM
 To: OpenStack Development Mailing List (not for usage questions)
 Subject: Re: [openstack-dev] [Cinder]a question about
 os-volume_upload_image
 
 On 02:58 Thu 03 Apr , Bohai (ricky) wrote:
  Hi,
 
  When I use an image to create a cinder volume, I found image's metadata is
 saved into DB table volume_glance_metadata.
 
  But when I use  os-volume_upload_image to create image from cinder
 volume, the metadata in volume_glance_metadata
  is not setted back to the newly created image. I can't found the reason for
 this.
  Anyone can give me a hint?
 
  I am a newbie for cinder and i apologize if I am missing something very
 obvious.
 
  Best regards to you.
  Ricky
 
 Hi Ricky,
 
 The glance metadata is currently only stored for creating new volumes, new
 snapshots or backups. It's used for in the volume creation to know if the 
 volume
 is bootable.
 
 --
 Mike Perez
 
 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-03 Thread 王宏
I agree. Actually, I already have a BP on it:
https://blueprints.launchpad.net/cinder/+spec/restore-image.
I am happy for any suggestion.

Best regards.
wanghong


2014-04-03 14:58 GMT+08:00 Bohai (ricky) bo...@huawei.com:

 Hi Mike,

 Thanks for your time and your answer.

 Whether it's better to provide an option for the user to make a image
 which inherit the volume stored glance metadata
 by os-volume_upload_image  ?
 Maybe it's a convenience for the user in some cases.

 Best regards to you.
 Ricky

  -Original Message-
  From: Mike Perez [mailto:thin...@gmail.com]
  Sent: Thursday, April 03, 2014 1:55 PM
  To: OpenStack Development Mailing List (not for usage questions)
  Subject: Re: [openstack-dev] [Cinder]a question about
  os-volume_upload_image
 
  On 02:58 Thu 03 Apr , Bohai (ricky) wrote:
   Hi,
  
   When I use an image to create a cinder volume, I found image's
 metadata is
  saved into DB table volume_glance_metadata.
  
   But when I use  os-volume_upload_image to create image from cinder
  volume, the metadata in volume_glance_metadata
   is not setted back to the newly created image. I can't found the
 reason for
  this.
   Anyone can give me a hint?
  
   I am a newbie for cinder and i apologize if I am missing something very
  obvious.
  
   Best regards to you.
   Ricky
 
  Hi Ricky,
 
  The glance metadata is currently only stored for creating new volumes,
 new
  snapshots or backups. It's used for in the volume creation to know if
 the volume
  is bootable.
 
  --
  Mike Perez
 
  ___
  OpenStack-dev mailing list
  OpenStack-dev@lists.openstack.org
  http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-03 Thread Duncan Thomas
On 3 April 2014 08:28, 王宏 w.wangho...@gmail.com wrote:
 I agree. Actually, I already have a BP on it:
 https://blueprints.launchpad.net/cinder/+spec/restore-image.
 I am happy for any suggestion.

Needs a little thought since container_format and some other fields
will need to be regenerated (e.g. we can source for a QCOW image, but
we always upload raw), but as long as these are dealt with it seems
like a useful feature

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-03 Thread Lingxian Kong
Thanks Duncan for your answer.

I am very interested in making a contribution towards this effort, but
what to do next? Waiting for approving for this blueprint? Or see
others' opinions on this before we putting more efforts in achieving
this? I just want to make sure that we could handle other people's use
cases and not just our own.




2014-04-03 18:12 GMT+08:00 Duncan Thomas duncan.tho...@gmail.com:

 On 3 April 2014 08:28, 王宏 w.wangho...@gmail.com wrote:
  I agree. Actually, I already have a BP on it:
  https://blueprints.launchpad.net/cinder/+spec/restore-image.
  I am happy for any suggestion.

 Needs a little thought since container_format and some other fields
 will need to be regenerated (e.g. we can source for a QCOW image, but
 we always upload raw), but as long as these are dealt with it seems
 like a useful feature

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




-- 
*---*
*Lingxian Kong*
Huawei Technologies Co.,LTD.
IT Product Line CloudOS PDU
China, Xi'an
Mobile: +86-18602962792
Email: konglingx...@huawei.com; anlin.k...@gmail.com
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-03 Thread 王宏
Hi Duncan Thomas.

I agree with you that some fields will need to be regenerated. I think we
can allow users supply the fields which need to be regenerated in the
request body. And the supplied fields will recover the fields in the 
restore_properties parameter. I will modify the description in my BP soon.

Best regards.
wanghong


2014-04-03 18:12 GMT+08:00 Duncan Thomas duncan.tho...@gmail.com:

 On 3 April 2014 08:28, 王宏 w.wangho...@gmail.com wrote:
  I agree. Actually, I already have a BP on it:
  https://blueprints.launchpad.net/cinder/+spec/restore-image.
  I am happy for any suggestion.

 Needs a little thought since container_format and some other fields
 will need to be regenerated (e.g. we can source for a QCOW image, but
 we always upload raw), but as long as these are dealt with it seems
 like a useful feature

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-03 Thread Bohai (ricky)
 -Original Message-
 From: Mike Perez [mailto:thin...@gmail.com]
 Sent: Friday, April 04, 2014 1:20 AM
 To: OpenStack Development Mailing List (not for usage questions)
 Subject: Re: [openstack-dev] [Cinder]a question about
 os-volume_upload_image
 
 On 18:37 Thu 03 Apr , Lingxian Kong wrote:
  Thanks Duncan for your answer.
 
  I am very interested in making a contribution towards this effort, but
  what to do next? Waiting for approving for this blueprint? Or see
  others' opinions on this before we putting more efforts in achieving
  this? I just want to make sure that we could handle other people's use
  cases and not just our own.
 
 What use case is that exactly? I mentioned earlier the original purpose was 
 for
 knowing if something was bootable. I'm curious on how else this is being used.
 

An image has the property for example: hw_scsi_model=virtio-scsi or other user 
specify property.
In process (1), cinder has saved the image property in the cinder DB.
I hope in process(2), cinder could provide an option to save the properties 
back to the new glance image.
Without this ability, user has to find all the properties in origin image and 
set them back by hand.
This is useful when user just want to make a little modify to an origin image.

An image --(1)-- cinder volume --(2)-- An new Image

Best regards to you.
Ricky

 --
 Mike Perez
 
 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-03 Thread Lingxian Kong
2014-04-04 9:32 GMT+08:00 Bohai (ricky) bo...@huawei.com:


 An image has the property for example: hw_scsi_model=virtio-scsi or other
 user specify property.
 In process (1), cinder has saved the image property in the cinder DB.
 I hope in process(2), cinder could provide an option to save the
 properties back to the new glance image.
 Without this ability, user has to find all the properties in origin image
 and set them back by hand.
 This is useful when user just want to make a little modify to an origin
 image.

 An image --(1)-- cinder volume --(2)-- An new Image


y
eah, this is what I want, but I wander whether it's reasonable for sombody
else.


-- 
*---*
*Lingxian Kong*
Huawei Technologies Co.,LTD.
IT Product Line CloudOS PDU
China, Xi'an
Mobile: +86-18602962792
Email: konglingx...@huawei.com; anlin.k...@gmail.com
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-03 Thread Mike Perez
On 01:32 Fri 04 Apr , Bohai (ricky) wrote:
  -Original Message-
  From: Mike Perez [mailto:thin...@gmail.com]
  Sent: Friday, April 04, 2014 1:20 AM
  To: OpenStack Development Mailing List (not for usage questions)
  Subject: Re: [openstack-dev] [Cinder]a question about
  os-volume_upload_image
  
  What use case is that exactly? I mentioned earlier the original purpose was 
  for
  knowing if something was bootable. I'm curious on how else this is being 
  used.
  
 
 An image has the property for example: hw_scsi_model=virtio-scsi or other 
 user specify property.
 In process (1), cinder has saved the image property in the cinder DB.
 I hope in process(2), cinder could provide an option to save the properties 
 back to the new glance image.
 Without this ability, user has to find all the properties in origin image and 
 set them back by hand.
 This is useful when user just want to make a little modify to an origin image.
 
 An image --(1)-- cinder volume --(2)-- An new Image

Hi Ricky,

Thanks for further explaining that to me. It does make sense, but I'm wondering
if there would be cases that people can think of where the properties specified
could become outdated because of changes that happen to the volume.  In glance
the properties make sense because an image is uploaded and has properties set.
The image is not going to be changed. If you want to change something about
that image, you upload a new one with the specified properties.  Rather with
a volume, it's constantly having blocks changed. Is there potential for that?
Could this problem be potential if a volume is migrated to a different backend?

-- 
Mike Perez

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Cinder]a question about os-volume_upload_image

2014-04-02 Thread Bohai (ricky)
Hi,

When I use an image to create a cinder volume, I found image's metadata is 
saved into DB table volume_glance_metadata.

But when I use  os-volume_upload_image to create image from cinder volume, 
the metadata in volume_glance_metadata 
is not setted back to the newly created image. I can't found the reason for 
this.
Anyone can give me a hint?

I am a newbie for cinder and i apologize if I am missing something very obvious.

Best regards to you.
Ricky


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev