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

marios marios at redhat.com
Fri Aug 28 13:48:11 UTC 2015


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.

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



More information about the OpenStack-dev mailing list