<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p><b><span style='font-size:9.0pt;font-family:"Trebuchet MS","sans-serif";color:#AAAAAA'>Dell Customer Communication</span></b><o:p></o:p></p><p class=MsoNormal>Thanks very much Qiming. It was the problem and I got it fixed by creating another port for the instance2.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>B.T.W., another question. When I delete the stack, how come the network was not deleted? It seems only the instance was deleted. How do I clean up the networks and subnets associated with the instance using heat?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>YuLing<o:p></o:p></p><p>-----Original Message-----<br>From: Qiming Teng [mailto:tengqim@linux.vnet.ibm.com]<br>Sent: Wednesday, July 16, 2014 3:59 AM<br>To: OpenStack Development Mailing List (not for usage questions)<br>Subject: Re: [openstack-dev] heat stack-create with two vm instances always got one failed<br><br>It seems that you are sharing one port between two instances, which won't be a legal configuration.<br><br>On Wed, Jul 16, 2014 at 01:17:00AM -0500, Yuling_C@DELL.com wrote:<br>> Dell Customer Communication<br>> <br>> Hi,<br>> I'm using heat to create a stack with two instances. I always got one of them successful, but the other would fail. If I split the template into two and each of them contains one instance then it worked. However, I thought Heat template would allow multiple instances being created?<br>> <br>> Here I attach the heat template:<br>> {<br>> "AWSTemplateFormatVersion" : "2010-09-09",<br>> "Description" : "Sample Heat template that spins up multiple instances and a private network (JSON)",<br>> "Resources" : {<br>> "test_net" : {<br>> "Type" : "OS::Neutron::Net",<br>> "Properties" : {<br>> "name" : "test_net"<br>> }<br>> },<br>> "test_subnet" : {<br>> "Type" : "OS::Neutron::Subnet",<br>> "Properties" : {<br>> "name" : "test_subnet",<br>> "cidr" : "120.10.9.0/24",<br>> "enable_dhcp" : "True",<br>> "gateway_ip" : "120.10.9.1",<br>> "network_id" : { "Ref" : "test_net" }<br>> }<br>> },<br>> "test_net_port" : {<br>> "Type" : "OS::Neutron::Port",<br>> "Properties" : {<br>> "admin_state_up" : "True",<br>> "network_id" : { "Ref" : "test_net" }<br>> }<br>> },<br>> "instance1" : {<br>> "Type" : "OS::Nova::Server",<br>> "Properties" : {<br>> "name" : "instance1",<br>> "image" : "8e2b4c71-448c-4313-8b41-b238af31f419",<br>> "flavor": "tvm-tt_lite",<br>> "networks" : [<br>> {"port" : { "Ref" : "test_net_port" }}<br>> ]<br>> }<br>> },<br>> "instance2" : {<br>> "Type" : "OS::Nova::Server",<br>> "Properties" : {<br>> "name" : "instance2",<br>> "image" : "8e2b4c71-448c-4313-8b41-b238af31f419",<br>> "flavor": "tvm-tt_lite",<br>> "networks" : [<br>> {"port" : { "Ref" : "test_net_port" }}<br>> ]<br>> }<br>> }<br>> }<br>> }<br>> The error that I got from heat-engine.log is as follows:<br>> <br>> 2014-07-16 01:49:50.514 25101 DEBUG heat.engine.scheduler [-] Task <br>> resource_action complete step<br>> /usr/lib/python2.6/site-packages/heat/engine/scheduler.py:170<br>> 2014-07-16 01:49:50.515 25101 DEBUG heat.engine.scheduler [-] Task <br>> stack_task from Stack "teststack" sleeping _sleep<br>> /usr/lib/python2.6/site-packages/heat/engine/scheduler.py:108<br>> 2014-07-16 01:49:51.516 25101 DEBUG heat.engine.scheduler [-] Task <br>> stack_task from Stack "teststack" running step<br>> /usr/lib/python2.6/site-packages/heat/engine/scheduler.py:164<br>> 2014-07-16 01:49:51.516 25101 DEBUG heat.engine.scheduler [-] Task <br>> resource_action running step<br>> /usr/lib/python2.6/site-packages/heat/engine/scheduler.py:164<br>> 2014-07-16 01:49:51.960 25101 DEBUG urllib3.connectionpool [-] "GET<br>> /v2/b64803d759e04b999e616b786b407661/servers/7cb9459c-29b3-4a23-a52c-1<br>> 7d85fce0559 HTTP/1.1" 200 1854 _make_request<br>> /usr/lib/python2.6/site-packages/urllib3/connectionpool.py:295<br>> 2014-07-16 01:49:51.963 25101 ERROR heat.engine.resource [-] CREATE : Server "instance1"<br>> 2014-07-16 01:49:51.963 25101 TRACE heat.engine.resource Traceback (most recent call last):<br>> 2014-07-16 01:49:51.963 25101 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/heat/engine/resource.py", line 371, in _do_action<br>> 2014-07-16 01:49:51.963 25101 TRACE heat.engine.resource while not check(handle_data):<br>> 2014-07-16 01:49:51.963 25101 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/heat/engine/resources/server.py", line 239, in check_create_complete<br>> 2014-07-16 01:49:51.963 25101 TRACE heat.engine.resource return self._check_active(server)<br>> 2014-07-16 01:49:51.963 25101 TRACE heat.engine.resource File "/usr/lib/python2.6/site-packages/heat/engine/resources/server.py", line 255, in _check_active<br>> 2014-07-16 01:49:51.963 25101 TRACE heat.engine.resource raise exc<br>> 2014-07-16 01:49:51.963 25101 TRACE heat.engine.resource Error: Creation of server instance1 failed.<br>> 2014-07-16 01:49:51.963 25101 TRACE heat.engine.resource<br>> 2014-07-16 01:49:51.996 25101 DEBUG heat.engine.scheduler [-] Task <br>> resource_action cancelled cancel<br>> /usr/lib/python2.6/site-packages/heat/engine/scheduler.py:187<br>> 2014-07-16 01:49:52.004 25101 DEBUG heat.engine.scheduler [-] Task <br>> stack_task from Stack "teststack" complete step<br>> /usr/lib/python2.6/site-packages/heat/engine/scheduler.py:170<br>> 2014-07-16 01:49:52.005 25101 WARNING heat.engine.service [-] Stack <br>> create failed, status FAILED<br>> 2014-07-16 01:50:29.218 25101 DEBUG heat.openstack.common.rpc.amqp [-] <br>> received {u'_context_roles': [u'Member', u'admin'], u'_msg_id':<br>> u'9aedf86fda304cfc857dc897d8393427', u'_context_password': <br>> '', u'_context_auth_url': <br>> u'http://172.17.252.60:5000/v2.0', u'_unique_id': <br>> u'f02188b068de4a4aba0ec203ec3ad54a', u'_reply_q': <br>> u'reply_f841b6a2101d4af9a9af59889630ee77', u'_context_aws_creds': <br>> None, u'args': {}, u'_context_tenant': u'TVM',<br>> u'_context_trustor_user_id': None, u'_context_trust_id': None,<br>> u'_context_auth_token': '', u'_context_is_admin': True,<br>> u'version': u'1.0', u'_context_tenant_id': <br>> u'b64803d759e04b999e616b786b407661', u'namespace': None, u'method': <br>> u'list_stacks', u'_context_username': None} _safe_log<br>> /usr/lib/python2.6/site-packages/heat/openstack/common/rpc/common.py:2<br>> 77<br>> <br>> Any idea?<br>> <br>> Thanks,<br>> YuLing<br><br>> _______________________________________________<br>> OpenStack-dev mailing list<br>> OpenStack-dev@lists.openstack.org<br>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br><br><br>_______________________________________________<br>OpenStack-dev mailing list<br>OpenStack-dev@lists.openstack.org<br>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<o:p></o:p></p></div></body></html>