Ask Your Question
0

How to discover all the instances in each vlan?using topology discover or any other way

asked 2014-08-21 04:02:03 -0500

CarlFeng gravatar image

hello,erveyone. I need to discover all the VMs in the Openstack. I've developed a topology discovery program using ICMP and runs in a VM. When the network mode is Flat or FlatDHCP, it works well, but when the network mode is Vlan, it cannot find other Vlan's machine. I konw it's caused by the isolation of Vlan. So how to find all the VMs when the network mode is Vlan??? We can use any way except checking the database... Thanks in advance!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-08-21 06:39:50 -0500

dbaxps gravatar image

updated 2014-08-21 07:59:05 -0500

In Neutron ML2&OVS&VLAN (VXLAN) for each tenant source his credentials ( select one user per tenant ) and issue nova list.

[root@icehouse1 ~]# cat ./test
#!/bin/bash
for user in demo boris ;
do
echo $user 
source keystonerc_$user 
nova list 
done
[root@icehouse1 ~]# ./test
demo
+--------------------------------------+---------------+-----------+------------+-------------+----------------------------------+
| ID                                   | Name          | Status    | Task State | Power State | Networks                         |
+--------------------------------------+---------------+-----------+------------+-------------+----------------------------------+
| f5bf5aa5-be31-48e2-be86-d60d6ca9a852 | UbuntuSRV001  | SUSPENDED | -          | Shutdown    | demonet=40.0.0.28, 192.168.1.170 |
| 9324ad03-0156-4955-aa05-e66b2a2b2abf | UbuntuSRV0817 | SUSPENDED | -          | Shutdown    | demonet=40.0.0.30, 192.168.1.172 |
| c8d242e4-4b3b-4597-b6a0-6787af67eff0 | VF20RS001     | SUSPENDED | -          | Shutdown    | demonet=40.0.0.29, 192.168.1.171 |
+--------------------------------------+---------------+-----------+------------+-------------+----------------------------------+
boris
+--------------------------------------+---------------+--------+------------+-------------+----------------------------------+
| ID                                   | Name          | Status | Task State | Power State | Networks                         |
+--------------------------------------+---------------+--------+------------+-------------+----------------------------------+
| a18a43da-aa67-4785-b4b1-9b5235e1fec2 | UbuntuSRV0820 | ACTIVE | -          | Running     | private=10.0.0.16, 192.168.1.176 |
+--------------------------------------+---------------+--------+------------+-------------+----------------------------------+
edit flag offensive delete link more

Comments

Thanks for your advice! But in this way, i need to know all the account and password. Is there a better way to discover all the instances without so much information? Thank you~

CarlFeng gravatar imageCarlFeng ( 2014-08-21 21:49:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-08-21 04:01:09 -0500

Seen: 288 times

Last updated: Aug 21 '14