<div dir="ltr">Hi,<div><br></div><div>first of all the syntax of the command you are using is wrong, right way to use multiple parameters in one argument would be</div><div><br></div><div>--parameters flavor_1=some_flavor_1_name;flavor2=some_flavor_2_name;...</div><div><br></div><div>or you can use it multiple times</div><div><br></div><div>--parameters flavor_1=some_flavor_1_name --parameters flavor2=some_flavor_2_name</div><div><br></div><div>Then, if your template defines say 2 server resources with parameters section as given in your snippet (I get that you use HOT yaml templates), each of them referencing its own flavor parameter like</div><div><br></div><div>resources:</div><div>  server_1:</div><div>    type: OS::Nova::Server</div><div>    properties:</div><div>      flavor: { get_param: flavor_1 }</div><div>....</div><div><div>  server_2:</div><div>    type: OS::Nova::Server</div><div>    properties:</div><div>      flavor: { get_param: flavor_2 }</div></div><div>....</div><div><br></div><div>everything should work.</div><div><br></div><div>BTW, what is the Heat / OpenStack version you are using?</div><div><br></div><div>Best regards,</div><div>Pavlo Shchelokovskyy.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 23, 2014 at 3:58 PM, Michelakis, Spiros (NSN - GR/Athens) <span dir="ltr"><<a href="mailto:spiros.michelakis@nsn.com" target="_blank">spiros.michelakis@nsn.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The command I’m running the following heat command:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">heat
<i>stack-create mystack --template-file ~/templates/my.yaml –parameters "key_name":"security_key","image_name":"my_image_name","cluster_identification":"tenant1","disk_config_size":"1","disk_mstate_size":"1","disk_log_size":"1","disk_services_size":"1",<b>"flavor_1":"small_flavor_1_name","flavor_2":"small_flavor_2_name"</b>}<u></u><u></u></i></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">and this is the part of template that refers to that parameters:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">parameters:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  key_name:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    type: string<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    description: Name of keypair to assign to servers<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  image_name:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    type: string<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    description: Name of image to use for servers<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  cluster_identification:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    description: Cluster identification.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    type: string<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    default: test<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  flavor_1:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    type: string<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    description: Flavor to use for servers<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    default: small_flavor_1<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">  flavor_2:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    type: string<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    description: Flavor to use for servers<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">    default: small_flavor_2<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Because I’m working on a proprietary product I cannot provide you with the exact template file….
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1f497d">L</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> sorry about that…
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1f497d">L</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">My question is general:
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Can I run the stack-create command ( as it is explained in the manuals:
<a href="http://docs.openstack.org/user-guide/content/heat-stack-create.html" target="_blank">http://docs.openstack.org/user-guide/content/heat-stack-create.html</a>) for more than 1 flavors? And how? Meaning, can I specify to this command a way to declare different flavors
 assigned to let’s say 2 instances? <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Br<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-SM-</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> ext Pavlo Shchelokovskyy [mailto:<a href="mailto:pshchelokovskyy@mirantis.com" target="_blank">pshchelokovskyy@mirantis.com</a>]
<br>
<b>Sent:</b> Thursday, October 23, 2014 1:29 PM<br>
<b>To:</b> <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
<b>Subject:</b> Re: [Openstack] Can I use more than one flavors on the heat create-stack command?<u></u><u></u></span></p>
</div><span class="">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">could you please post the exact template and the exact command to create the stack from this template you were using when you got this error? It would really help to understand the problem better.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Best regards,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Pavlo Shchelokovskyy.<u></u><u></u></p>
</div>
</div>
</span><div>
<p class="MsoNormal"><u></u> <u></u></p>
<div><span class="">
<p class="MsoNormal">On Thu, Oct 23, 2014 at 12:08 PM, Michelakis, Spiros (NSN - GR/Athens) <<a href="mailto:spiros.michelakis@nsn.com" target="_blank">spiros.michelakis@nsn.com</a>> wrote:<u></u><u></u></p>
</span><div><span class="">
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">Hi,</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">I’m trying to create a stack by using heat templates. I’m using this command, as it is described in OSR manual:</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><i><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">stack-create mystack --template-file /PATH_TO_HEAT_TEMPLATES/WordPress_Single_Instance.template --parameters "InstanceType=m1.large;DBUsername=USERNAME;DBPassword=PASSWORD;KeyName=HEAT_KEY;LinuxDistribution=F17"</span></i><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">when I try to run this command having the same flavor for all my instances, it works fine. The problem raises when I want to
 create 2 or more instances with different flavors on each one of them. </span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">I’m using these parameters on the “–parameters” field on the above command:</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><i><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">{"key_name":"security_key","image_name":"my_image_name","cluster_identification":"<tenant_name>","disk_config_size":"1","disk_mstate_size":"1","disk_log_size":"1","disk_services_size":"1",<b><span style="color:red">"flavor_1":"small_flavor_1_name","flavor_2":"small_flavor_2_name"</span></b>}</span></i><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">The error that raises when I’m trying to execute this command is:</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><i><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">“error: NegativeStateReached: Object "id:c2dda18d-9019-4e9c-8514-245650e4b201 name:ng-ci-20141020-184706-heat_name" negative
 state "stack_status":"CREATE_FAILED" reached (Resource CREATE failed: Error: Creation of server 2 failed.)”</span></i><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">I have checked logs under
</span><span style="font-size:9.0pt;font-family:"Courrier New";background:white">/var/log/messages</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white"> and
</span><span style="font-size:9.0pt;font-family:"Courrier New";background:white">/var/log/nova/scheduler.log
</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">without any findings.</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">My questions:</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
</span><p class="MsoNormal" style="margin-right:0cm;margin-bottom:4.6pt;margin-left:0cm;background:#fafafa">
<u></u><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><span>1.<span style="font:7.0pt "Times New Roman"">    
</span></span></span><u></u><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">Is there any restriction on the “–parameters” field of the above command that prevents from running this command for more than one flavors in
 this command?</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:#fafafa"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:4.6pt;margin-left:0cm;background:#fafafa">
<u></u><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><span>2.<span style="font:7.0pt "Times New Roman"">    
</span></span></span><u></u><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">I have read in a forum that in order to implement this, we have to specify an availability zone other than the default one (nova AZ) including
 the instances we want to use on the –parameters field. Is this true? I cannot find any “logical explanation” behind that thought….. How the existence of an AZ would affect the execution of this command?</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:#fafafa"><u></u><u></u></span></p><span class="">
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">I would appreciate if you could provide me with any kind of tip or solution for this issue.</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">Thank you in advance for your support.</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">BR,</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div style="margin-top:12.65pt;margin-bottom:4.6pt">
<p class="MsoNormal" style="background:#fafafa"><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif";background:white">Michelakis Spyros</span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><span style="font-size:8.0pt;font-family:"Helvetica","sans-serif""><u></u><u></u></span></p>
</div>
</span></div><span class="">
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><u></u><u></u></p>
</span></div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>

</blockquote></div><br></div>