<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div><br></div><pre>At 2015-08-28 21:48:11, "marios" <marios@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.
<div>></div><div><span style="color: rgb(0, 0, 255);"><span style="background-color: rgb(255, 255, 255);">------<span style="font-family: Arial; white-space: normal; line-height: 1.7; background-color: rgb(255, 255, 255);">According to the codes of heat and novaclient, the </span></span><span style="line-height: 1.7;">above template is the equivalent of</span></span></div><div><pre><span style="color: rgb(0, 0, 255);"> specifying --swap on the nova boot cli:</span></pre></div><div style="font-family: Arial; white-space: normal;"><span style="color: rgb(0, 0, 255); background-color: rgb(255, 255, 255);"><a href="https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/shell.py#L142-L146" _src="https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/shell.py#L142-L146">https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/shell.py#L142-L146</a> </span></div><div><font face="Arial"><span style="white-space: normal; color: rgb(0, 0, 255);"><a href="https://github.com/openstack/heat/blob/master/heat/engine/resources/openstack/nova/server.py#L822-L831" _src="https://github.com/openstack/heat/blob/master/heat/engine/resources/openstack/nova/server.py#L822-L831">https://github.com/openstack/heat/blob/master/heat/engine/resources/openstack/nova/server.py#L822-L831</a></span></font></div><div><font color="#0000ff" face="Arial"><span style="white-space: normal;"><br></span></font></div><div><font color="#0000ff" face="Arial"><span style="white-space: normal;">But don't know much about nova, and not sure how does nova behave if specified different swap size on Flavor</span></font></div><div><font color="#0000ff" face="Arial"><span style="white-space: normal;"><br></span></font></div><div><font color="#0000ff" face="Arial"><span style="white-space: normal;">and Bdm.</span></font></div><div><font color="#0000ff" face="Arial"><span style="white-space: normal;"><br></span></font></div>>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@lists.openstack.org?subject:unsubscribe
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
</pre></div>