<div dir="ltr">The number is the ID of the instance in the nova.instances table:<div><br></div><div><div><font face="monospace, monospace">mysql> select id from instances where uuid = '9927550c-5950-4daf-9f05-0530e51d36c7';</font></div><div><font face="monospace, monospace">+-------+</font></div><div><font face="monospace, monospace">| id    |</font></div><div><font face="monospace, monospace">+-------+</font></div><div><font face="monospace, monospace">| 19437 |</font></div><div><font face="monospace, monospace">+-------+</font></div></div><div><br></div><div><font face="monospace, monospace">$ iptables-save | grep 19437</font></div><div><font face="monospace, monospace">:nova-compute-inst-19437 - [0:0]</font></div><div><font face="monospace, monospace">-A nova-compute-inst-19437 -m state --state INVALID -j DROP</font></div><div><font face="monospace, monospace">-A nova-compute-inst-19437 -m state --state RELATED,ESTABLISHED -j ACCEPT</font></div><div><font face="monospace, monospace">-A nova-compute-inst-19437 -j nova-compute-provider</font></div><div><font face="monospace, monospace">...</font></div><div><br></div><div>The only way I've found to obtain that ID without looking directly in the DB is to convert the `OS-EXT-SRV-ATTR:instance_name` value to decimal:</div><div><br></div><div><div><font face="monospace, monospace">$ nova show 9927550c-5950-4daf-9f05-0530e51d36c7 | grep OS-EXT-SRV-ATTR:instance_name</font></div><div><font face="monospace, monospace">| OS-EXT-SRV-ATTR:instance_name        | instance-00004bed</font></div></div><div><br></div><div>00004bed in hex = 19437 in decimal<br></div><div><br></div><div>Hope that helps :)</div><div>Joe</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 18, 2015 at 3:57 PM, James Denton <span dir="ltr"><<a href="mailto:james.denton@rackspace.com" target="_blank">james.denton@rackspace.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I’m not sure, but the X may be arbitrary. You should be able to correlate the <span style="font-family:Consolas,'Lucida Console',monospace;font-size:12.8000001907349px;background-color:rgb(240,247,255)">nova-compute-inst-X </span>chain to the instance by looking at the 'nova-compute-local’ chain and looking for the fixed IP:<br><div><br></div><div><div>-A nova-compute-local -d <a href="http://10.239.0.11/32" target="_blank">10.239.0.11/32</a> -j nova-compute-inst-25</div><div>-A nova-compute-local -d <a href="http://10.239.0.18/32" target="_blank">10.239.0.18/32</a> -j nova-compute-inst-65</div><div>-A nova-compute-local -d <a href="http://10.239.0.26/32" target="_blank">10.239.0.26/32</a> -j nova-compute-inst-95</div><div>-A nova-compute-local -d <a href="http://10.239.0.20/32" target="_blank">10.239.0.20/32</a> -j nova-compute-inst-69</div><div><br></div><div>In the DB, the correlation exists:</div><div><br></div><div><div><font face="Consolas">root@controller01:~# nova list --all-ten | grep 10.239.0.11</font></div><div><font face="Consolas">| 1bbb6888-b74f-4fc3-8c22-4c5231823567 | myInstance     | ACTIVE | public=10.239.0.11, 10.242.0.232 |</font></div></div><div><font face="Consolas"><br></font></div><div><div><font face="Consolas">mysql> use nova; select * from security_group_instance_association where instance_uuid='1bbb6888-b74f-4fc3-8c22-4c5231823567';</font></div><div><font face="Consolas">Database changed</font></div><div><font face="Consolas">+---------------------+------------+------------+---------+----+-------------------+--------------------------------------+</font></div><div><font face="Consolas">| created_at          | updated_at | deleted_at | deleted | id | security_group_id | instance_uuid                        |</font></div><div><font face="Consolas">+---------------------+------------+------------+---------+----+-------------------+--------------------------------------+</font></div><div><font face="Consolas">| 2013-07-03 14:40:47 | NULL       | NULL       |       0 | 25 |                 3 | 1bbb6888-b74f-4fc3-8c22-4c5231823567 |</font></div><div><font face="Consolas">+---------------------+------------+------------+---------+----+-------------------+———————————————————+</font></div></div><div><br></div><div>The ID (25) corresponds to the chain name seen here:</div><div><br></div><div>-A nova-compute-local -d <a href="http://10.239.0.11/32" target="_blank">10.239.0.11/32</a> -j nova-compute-inst-25</div><div><br></div><div><div><div>James</div></div></div></div>
<br><div><blockquote type="cite"><div><div class="h5"><div>On Mar 18, 2015, at 1:37 PM, mad Engineer <<a href="mailto:themadengin33r@gmail.com" target="_blank">themadengin33r@gmail.com</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr">I am having issue troubleshooting iptables rules.<div><br></div><div>How can i identify which chain belongs to which instance..</div><div><br></div><div>i can see <span style="font-family:Consolas,'Lucida Console',monospace;font-size:12.8000001907349px;background-color:rgb(240,247,255)">nova-compute-inst-X </span><span style="font-family:Consolas,'Lucida Console',monospace;font-size:12.8000001907349px;background-color:rgb(255,255,255)"> but i am not able to relate X to nova list or to virsh list,Can some one please help in identifying proper iptables chains</span><br><div><br></div></div></div></div></div>
_______________________________________________<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><br></div></blockquote></div><br></div><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">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><br>
<br></blockquote></div><br></div>