[openstack-dev] [Heat] Use block_device_mapping_v2 for swap?

TIANTIAN tiantian223 at 163.com
Mon Aug 31 08:19:38 UTC 2015



At 2015-08-28 21:48:11, "marios" <marios at redhat.com> wrote:
>I am working with the OS::Nova::Server resource and looking at the tests
>[1], it should be possible to just define 'swap_size' and get a swap
>space created on the instance:
>
>  NovaCompute:
>    type: OS::Nova::Server
>    properties:
>      image:
>        {get_param: Image}
>      ...
>      block_device_mapping_v2:
>        - swap_size: 1
>
>When trying this the first thing I hit is a validation code nit that is
>already fixed @ [2] (I have slightly older heat) and I applied that fix.
>However, when I try and deploy with a Flavor that has a 2MB swap for
>example, and with the above template, I still end up with a 2MB swap.
>
>Am I right in my assumption that the above template is the equivalent of
>specifying --swap on the nova boot cli (i.e. should this work?)? I am
>working with the Ironic nova driver btw and when deploying using the
>nova cli using --swap works; has anyone used/tested this property
>recently? I'm not yet sure if this is worth filing a bug for yet.

>
------According to the codes of heat and novaclient, the above template is the equivalent of
       specifying --swap on the nova boot cli:
https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/shell.py#L142-L146
https://github.com/openstack/heat/blob/master/heat/engine/resources/openstack/nova/server.py#L822-L831


But don't know much about nova, and not sure how does nova behave if specified different swap size on Flavor


and Bdm.


>thanks very much for reading! marios > >[1] >https://github.com/openstack/heat/blob/a1819ff0696635c516d0eb1c59fa4f70cae27d65/heat/tests/nova/test_server.py#L2446 >[2] >https://review.openstack.org/#/q/I2c538161d88a51022b91b584f16c1439848e7ada,n,z > >__________________________________________________________________________ >OpenStack Development Mailing List (not for usage questions) >Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe >http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150831/8658278b/attachment.html>


More information about the OpenStack-dev mailing list