<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Pekka<br>
<br>
I've raised
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="https://bugs.launchpad.net/heat/+bug/1192371">https://bugs.launchpad.net/heat/+bug/1192371</a>
to track this.<br>
<br>
Could you attempt to replicate the issue with current heat git
master and post your results to the bug?<br>
<br>
cheers<br>
<br>
On 06/18/2013 11:02 PM, Pekka Rinne wrote:<br>
</div>
<blockquote
cite="mid:CACAG2VVWCUscPx6L0NynBVdALU6bO7dKK_McnPDd4nSTS-4Bkw@mail.gmail.com"
type="cite">
<div dir="ltr">hello world
<div><br>
</div>
<div style="">I've got a template which gives list index out of
range occasionally from heat (grizzly). Any ideas why?
sometimes it works ok. Some kind of race situation? I'm just
trying to learn quantum usage here..</div>
<div style=""><br>
</div>
<div style="">
<div>2013-06-18 18:52:02.585 27948 ERROR heat.engine.resource
[-] create Instance "inst1"</div>
<div>2013-06-18 18:52:02.585 27948 TRACE heat.engine.resource
Traceback (most recent call last):</div>
<div>2013-06-18 18:52:02.585 27948 TRACE heat.engine.resource
File
"/usr/local/lib/python2.7/dist-packages/heat-2013.1.1.a1.g6ed78c2-py2.7.egg/heat/engine/resource.py",
line 321, in create</div>
<div>2013-06-18 18:52:02.585 27948 TRACE heat.engine.resource
while not self.check_active():</div>
<div>2013-06-18 18:52:02.585 27948 TRACE heat.engine.resource
File
"/usr/local/lib/python2.7/dist-packages/heat-2013.1.1.a1.g6ed78c2-py2.7.egg/heat/engine/resources/instance.py",
line 325, in check_active</div>
<div>2013-06-18 18:52:02.585 27948 TRACE heat.engine.resource
self._set_ipaddress(server.networks)</div>
<div>2013-06-18 18:52:02.585 27948 TRACE heat.engine.resource
File
"/usr/local/lib/python2.7/dist-packages/heat-2013.1.1.a1.g6ed78c2-py2.7.egg/heat/engine/resources/instance.py",
line 125, in _set_ipaddress</div>
<div>2013-06-18 18:52:02.585 27948 TRACE heat.engine.resource
self.ipaddress = networks[n][0]</div>
<div>2013-06-18 18:52:02.585 27948 TRACE heat.engine.resource
IndexError: list index out of range</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>{</div>
<div> "AWSTemplateFormatVersion" : "2010-09-09",</div>
<div><br>
</div>
<div> "Description" : "tbd",</div>
<div><br>
</div>
<div> "Parameters" : {</div>
<div><br>
</div>
<div> "KeyName" : {</div>
<div> "Description" : "Keydescription",</div>
<div> "Type" : "String"</div>
<div> },</div>
<div><br>
</div>
<div> "InstanceType" : {</div>
<div> "Description" : "Instancetype",</div>
<div> "Type" : "String",</div>
<div> "Default" : "m1.small",</div>
<div> "AllowedValues" : [ "m1.small" ],</div>
<div> "ConstraintDescription" : "must be a valid EC2
instance type."</div>
<div> },</div>
<div><br>
</div>
<div> "MyDistribution": {</div>
<div> "Default": "MyDistro",</div>
<div> "Description" : "Distribution of mine",</div>
<div> "Type": "String",</div>
<div> "AllowedValues" : [ "MyDistro" ]</div>
<div> }</div>
<div>
<br>
</div>
<div> },</div>
<div><br>
</div>
<div> "Mappings" : {</div>
<div> "AWSInstanceType2Arch" : {</div>
<div> "m1.small" : { "Arch" : "64" }</div>
<div> },</div>
<div> "DistroArch2AMI": {</div>
<div> "MyDistro" : { "64" : "ubuntu1304-amd64" }</div>
<div> }</div>
<div> },</div>
<div><br>
</div>
<div> "Resources" : {</div>
<div><br>
</div>
<div> "network1": {</div>
<div> "Type": "OS::Quantum::Net"</div>
<div> },</div>
<div><br>
</div>
<div> "network2": {</div>
<div> "Type": "OS::Quantum::Net"</div>
<div> },</div>
<div><br>
</div>
<div> "mgmt-subnet": {</div>
<div> "Type": "OS::Quantum::Subnet",</div>
<div> "Properties": {</div>
<div> "network_id": { "Ref" : "network1" },</div>
<div> "ip_version": 4,</div>
<div> "cidr": "<a moz-do-not-send="true"
href="http://30.0.1.0/24">30.0.1.0/24</a>",</div>
<div><span class="" style="white-space:pre"> </span>"gateway_ip":
"30.0.1.1",</div>
<div><span class="" style="white-space:pre"> </span>"allocation_pools":
[{"start": "30.0.1.2", "end": "30.0.1.20"}]</div>
<div> }</div>
<div> },</div>
<div><br>
</div>
<div> "traffic-subnet": {</div>
<div> "Type": "OS::Quantum::Subnet",</div>
<div> "Properties": {</div>
<div> "network_id": { "Ref" : "network2" },</div>
<div> "ip_version": 4,</div>
<div> "cidr": "<a moz-do-not-send="true"
href="http://40.0.1.0/24">40.0.1.0/24</a>",</div>
<div><span class="" style="white-space:pre"> </span>"gateway_ip":
"40.0.1.1",</div>
<div><span class="" style="white-space:pre"> </span>"allocation_pools":
[{"start": "40.0.1.2", "end": "40.0.1.20"}]</div>
<div> }</div>
<div> },</div>
<div><br>
</div>
<div> "network1port1": {</div>
<div> "Type": "OS::Quantum::Port",</div>
<div> "Properties": {</div>
<div> "network_id": { "Ref" : "network1" }</div>
<div> }</div>
<div> },</div>
<div><br>
</div>
<div> "network1port2": {</div>
<div> "Type": "OS::Quantum::Port",</div>
<div> "Properties": {</div>
<div> "network_id": { "Ref" : "network1" }</div>
<div> }</div>
<div> },</div>
<div><br>
</div>
<div> "network2port1": {</div>
<div> "Type": "OS::Quantum::Port",</div>
<div> "Properties": {</div>
<div> "network_id": { "Ref" : "network2" }</div>
<div> }</div>
<div> },</div>
<div><br>
</div>
<div> "network2port2": {</div>
<div> "Type": "OS::Quantum::Port",</div>
<div> "Properties": {</div>
<div> "network_id": { "Ref" : "network2" }</div>
<div> }</div>
<div> },</div>
<div><br>
</div>
<div> "inst1": {</div>
<div> "Type": "AWS::EC2::Instance",</div>
<div> "Metadata" : {</div>
<div> "AWS::CloudFormation::Init" : {</div>
<div> }</div>
<div> },</div>
<div> "Properties": {</div>
<div><br>
</div>
<div> "ImageId" : { "Fn::FindInMap" : [
"DistroArch2AMI", { "Ref" : "MyDistribution" },</div>
<div> { "Fn::FindInMap" : [
"AWSInstanceType2Arch", { "Ref" : "InstanceType" }, "Arch"
] } ] },</div>
<div> "InstanceType" : { "Ref" : "InstanceType" },</div>
<div> "KeyName" : { "Ref" : "KeyName" },<span
class="" style="white-space:pre"> </span></div>
<div><br>
</div>
<div><span class="" style="white-space:pre"> </span>
"NetworkInterfaces" : [</div>
<div><span class="" style="white-space:pre"> </span> {
"NetworkInterfaceId" : { "Ref" : "network1port1" },
"DeviceIndex" : "0" },</div>
<div><span class="" style="white-space:pre"> </span> {
"NetworkInterfaceId" : { "Ref" : "network2port1" },
"DeviceIndex" : "1" }</div>
<div><span class="" style="white-space:pre"> </span> ]</div>
<div><br>
</div>
<div> } </div>
<div> },</div>
<div><br>
</div>
<div> "inst2": {</div>
<div> "Type": "AWS::EC2::Instance",</div>
<div> "Metadata" : {</div>
<div> "AWS::CloudFormation::Init" : {</div>
<div> }</div>
<div> },</div>
<div> "Properties": {</div>
<div><br>
</div>
<div> "ImageId" : { "Fn::FindInMap" : [
"DistroArch2AMI", { "Ref" : "MyDistribution" },</div>
<div> { "Fn::FindInMap" : [
"AWSInstanceType2Arch", { "Ref" : "InstanceType" }, "Arch"
] } ] },</div>
<div> "InstanceType" : { "Ref" : "InstanceType" },</div>
<div> "KeyName" : { "Ref" : "KeyName" },</div>
<div><span class="" style="white-space:pre"> </span>
"NetworkInterfaces" : [</div>
<div><span class="" style="white-space:pre"> </span> {
"NetworkInterfaceId" : { "Ref" : "network1port2" },
"DeviceIndex" : "0" },</div>
<div><span class="" style="white-space:pre"> </span> {
"NetworkInterfaceId" : { "Ref" : "network2port2" },
"DeviceIndex" : "1" }</div>
<div><span class="" style="white-space:pre"> </span> ]</div>
<div> } </div>
<div> }</div>
<div> }</div>
<div>}</div>
<div><br>
</div>
<div style="">br,</div>
<div style="">Pekka</div>
<div style=""><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Mailing list: <a class="moz-txt-link-freetext" href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a>
Post to : <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a>
Unsubscribe : <a class="moz-txt-link-freetext" href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a>
More help : <a class="moz-txt-link-freetext" href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a>
</pre>
</blockquote>
<br>
</body>
</html>