Re: [openstack-dev] [nova] Discuss the option delete_on_termination

2014-01-28 Thread John Garbutt
On 26 January 2014 09:23, 黎林果 lilinguo8...@gmail.com wrote:
 Hi,

 I have started the implementation, Please review. Address:
 https://review.openstack.org/#/c/67067/

 Thanks.

 Regards,
 Lee

Hi lee,

I have added the same comments as Christopher to the blueprint.

Please look at updating the blueprint's milestone, and ensuring the
plan in the blueprint is up to date, and only includes Nova work.

Thanks,
John



 2014/1/9 Christopher Yeoh cbky...@gmail.com:
 On Thu, Jan 9, 2014 at 5:00 PM, 黎林果 lilinguo8...@gmail.com wrote:

 Oh, I see. Thank you very much.
 It's just hard coded for attaching volume and swapping volume.

 How to deal the bp:

 https://blueprints.launchpad.net/nova/+spec/add-delete-on-termination-option
 ?


 So I think the only thing left in your bp would be adding a delete on
 terminate option when attaching a volume to an existing server and the
 novaclient changes. So I'd cleanup the blueprint and then set the milestone
 target to icehouse-3 which will trigger it to get it reviewed. Perhaps
 consider whether its reasonable to just apply this to the V3 API rather than
 doing an enhancement for both the V2 and V3 API.

 Regards,

 Chris


 2014/1/9 Christopher Yeoh cbky...@gmail.com:
  On Thu, Jan 9, 2014 at 2:35 PM, 黎林果 lilinguo8...@gmail.com wrote:
 
  Hi Chris,
  Thanks for you reply.
 
  It's not only hard coded for swap volumes. In function
  '_create_instance' which for creating instance of nova/compute/api.py,
  the '_prepare_image_mapping' function will be called. And it hard code
  to True, too.
 
  values = block_device.BlockDeviceDict({
  'device_name': bdm['device'],
  'source_type': 'blank',
  'destination_type': 'local',
  'device_type': 'disk',
  'guest_format': guest_format,
  'delete_on_termination': True,
  'boot_index': -1})
 
 
  Just before that in _prepare_image_mapping is:
 
  if virtual_name == 'ami' or virtual_name == 'root':
  continue
 
  if not block_device.is_swap_or_ephemeral(virtual_name):
  continue
 
 
  Chris
 
 
  ___
  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


 ___
 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] [nova] Discuss the option delete_on_termination

2014-01-26 Thread 黎林果
Hi,

I have started the implementation, Please review. Address:
https://review.openstack.org/#/c/67067/

Thanks.

Regards,
Lee

2014/1/9 Christopher Yeoh cbky...@gmail.com:
 On Thu, Jan 9, 2014 at 5:00 PM, 黎林果 lilinguo8...@gmail.com wrote:

 Oh, I see. Thank you very much.
 It's just hard coded for attaching volume and swapping volume.

 How to deal the bp:

 https://blueprints.launchpad.net/nova/+spec/add-delete-on-termination-option
 ?


 So I think the only thing left in your bp would be adding a delete on
 terminate option when attaching a volume to an existing server and the
 novaclient changes. So I'd cleanup the blueprint and then set the milestone
 target to icehouse-3 which will trigger it to get it reviewed. Perhaps
 consider whether its reasonable to just apply this to the V3 API rather than
 doing an enhancement for both the V2 and V3 API.

 Regards,

 Chris


 2014/1/9 Christopher Yeoh cbky...@gmail.com:
  On Thu, Jan 9, 2014 at 2:35 PM, 黎林果 lilinguo8...@gmail.com wrote:
 
  Hi Chris,
  Thanks for you reply.
 
  It's not only hard coded for swap volumes. In function
  '_create_instance' which for creating instance of nova/compute/api.py,
  the '_prepare_image_mapping' function will be called. And it hard code
  to True, too.
 
  values = block_device.BlockDeviceDict({
  'device_name': bdm['device'],
  'source_type': 'blank',
  'destination_type': 'local',
  'device_type': 'disk',
  'guest_format': guest_format,
  'delete_on_termination': True,
  'boot_index': -1})
 
 
  Just before that in _prepare_image_mapping is:
 
  if virtual_name == 'ami' or virtual_name == 'root':
  continue
 
  if not block_device.is_swap_or_ephemeral(virtual_name):
  continue
 
 
  Chris
 
 
  ___
  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


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


Re: [openstack-dev] [nova] Discuss the option delete_on_termination

2014-01-09 Thread Christopher Yeoh
On Thu, Jan 9, 2014 at 5:00 PM, 黎林果 lilinguo8...@gmail.com wrote:

 Oh, I see. Thank you very much.
 It's just hard coded for attaching volume and swapping volume.

 How to deal the bp:

 https://blueprints.launchpad.net/nova/+spec/add-delete-on-termination-option
 ?


So I think the only thing left in your bp would be adding a delete on
terminate option when attaching a volume to an existing server and the
novaclient changes. So I'd cleanup the blueprint and then set the milestone
target to icehouse-3 which will trigger it to get it reviewed. Perhaps
consider whether its reasonable to just apply this to the V3 API rather
than doing an enhancement for both the V2 and V3 API.

Regards,

Chris


 2014/1/9 Christopher Yeoh cbky...@gmail.com:
  On Thu, Jan 9, 2014 at 2:35 PM, 黎林果 lilinguo8...@gmail.com wrote:
 
  Hi Chris,
  Thanks for you reply.
 
  It's not only hard coded for swap volumes. In function
  '_create_instance' which for creating instance of nova/compute/api.py,
  the '_prepare_image_mapping' function will be called. And it hard code
  to True, too.
 
  values = block_device.BlockDeviceDict({
  'device_name': bdm['device'],
  'source_type': 'blank',
  'destination_type': 'local',
  'device_type': 'disk',
  'guest_format': guest_format,
  'delete_on_termination': True,
  'boot_index': -1})
 
 
  Just before that in _prepare_image_mapping is:
 
  if virtual_name == 'ami' or virtual_name == 'root':
  continue
 
  if not block_device.is_swap_or_ephemeral(virtual_name):
  continue
 
 
  Chris
 
 
  ___
  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] [nova] Discuss the option delete_on_termination

2014-01-09 Thread Lingxian Kong
Hi lingguo:

Maybe you could go to IRC to look for some comments/feedbacks, some Cores
should be right there. Hope you can hear opinions on this before putting
more efforts in resolving this .


2014/1/8 黎林果 lilinguo8...@gmail.com

 Hi All,

Attach a volume when creating a server, the API contains
 'block_device_mapping', such as:
 block_device_mapping: [
 {
 volume_id: VOLUME_ID,
 device_name: /dev/vdc,
 delete_on_termination: true
 }
 ]

 It allows the option 'delete_on_termination', but in the code it's
 hardcoded to True. Why?

 Another situation, attach a volume to an exists server, there is
 not the option 'delete_on_termination'.

   Should we add the 'delete_on_termination' when attach a volume to an
 exists server or modify the value from the params?


   See also:

 https://blueprints.launchpad.net/nova/+spec/add-delete-on-termination-option


 Best regards!

 ___
 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


[openstack-dev] [nova] Discuss the option delete_on_termination

2014-01-08 Thread 黎林果
Hi All,

   Attach a volume when creating a server, the API contains
'block_device_mapping', such as:
block_device_mapping: [
{
volume_id: VOLUME_ID,
device_name: /dev/vdc,
delete_on_termination: true
}
]

It allows the option 'delete_on_termination', but in the code it's
hardcoded to True. Why?

Another situation, attach a volume to an exists server, there is
not the option 'delete_on_termination'.

  Should we add the 'delete_on_termination' when attach a volume to an
exists server or modify the value from the params?


  See also:
https://blueprints.launchpad.net/nova/+spec/add-delete-on-termination-option


Best regards!

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


[openstack-dev] [nova] Discuss the option delete_on_termination

2014-01-02 Thread 黎林果
Hi,
All

   Attach a volume when creating a server, the API contains
'block_device_mapping', such as:
block_device_mapping: [
{
volume_id: VOLUME_ID,
device_name: /dev/vdc,
delete_on_termination: true
}
]

It allows the option 'delete_on_termination', but in the code it's
hardcoded to True. Why?

Another situation, attach a volume to an exists server, there is
not the option 'delete_on_termination'.

  Should we add the 'delete_on_termination' when attach a volume to an
exists server or modify the value from the params?


  See also:
https://blueprints.launchpad.net/nova/+spec/add-delete-on-termination-option


Best regards!

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