lost and found ( for me ? )

OpenStack logs ( network namespace )

Reference
https://www.rdoproject.org/troubleshooting/networking/
https://www.rdoproject.org/networking/networking-in-too-much-detail/

There are three nodes running, controller, network and compute node in my environment.

                  the internet
vm1  vm2            |
compute          network node            controller node
   |------------------------|-------------------------------------|

user01 has a router “my-router”.
+--------------------------------------+-----------+----------------------------------------------------------------------+
(neutron) [root@controller ~(keystone_user01)]# neutron router-list
+--------------------------------------+-----------+----------------------------------------------------------------------+
| id                                   | name      | external_gateway_info                                                |
+--------------------------------------+-----------+----------------------------------------------------------------------+
| 3be9346b-9447-46d4-8222-f507be59357e | my-router | {"network_id": "b586f891-9821-4b0b-8d0e-b224b164383c",               |
|                                      |           | "enable_snat": true, "external_fixed_ips": [{"subnet_id": "96a2cf60  |
|                                      |           | -346d-4ad7-8975-89a4c8f19bb0", "ip_address": "192.168.131.131"}]}    |
+--------------------------------------+-----------+----------------------------------------------------------------------+
[root@controller ~(keystone_user01)]#

on the network node, list network namespace.
[root@network ~]# ip netns list
qdhcp-b586f891-9821-4b0b-8d0e-b224b164383c
qdhcp-7745f545-4d41-4f0d-9653-899a1526af8c
qrouter-3be9346b-9447-46d4-8222-f507be59357e
qdhcp-ecc3c3f9-31bd-4998-a41d-b682b508bfb5
qdhcp-d586146c-d5cb-42d5-b2f6-c0a78a7e8f82
qrouter-cf414122-2ed7-446c-88a6-448876d8196b

qrouter- : router’s namespace
qdhcp- : dhcp namespace

[ router namespace ]

my-router has two interfaces.

qr-ec8a8119-49 is for internal network
qg-05a86ecc-dd is for external network

[root@network ~]# ip netns exec qrouter-3be9346b-9447-46d4-8222-f507be59357e ip -4 a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
   inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
12: qr-ec8a8119-49: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN
   inet 192.168.37.1/24 brd 192.168.37.255 scope global qr-ec8a8119-49
      valid_lft forever preferred_lft forever
19: qg-05a86ecc-dd: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN
   inet 192.168.131.131/24 brd 192.168.131.255 scope global qg-05a86ecc-dd
      valid_lft forever preferred_lft forever
   inet 192.168.131.132/32 brd 192.168.131.132 scope global qg-05a86ecc-dd
      valid_lft forever preferred_lft forever
   inet 192.168.131.133/32 brd 192.168.131.133 scope global qg-05a86ecc-dd
      valid_lft forever preferred_lft forever

Access to the instance from this router.

Two instances are running.
[root@controller ~(keystone_user01)]# nova list
+--------------------------------------+-------------------+--------+------------+-------------+----------------------------------------+
| ID                                   | Name              | Status | Task State | Power State | Networks                               |
+--------------------------------------+-------------------+--------+------------+-------------+----------------------------------------+
| 76dbd219-4e69-461e-9404-26270e9b4cd8 | my-first-instance | ACTIVE | -          | Running     | internal=192.168.37.3, 192.168.131.132 |
| c98521fc-cf0a-4dc1-ac89-4f88bb5d80c8 | second-instance   | ACTIVE | -          | Running     | internal=192.168.37.4, 192.168.131.133 |
+--------------------------------------+-------------------+--------+------------+-------------+----------------------------------------+
[root@controller ~(keystone_user01)]#

Access to the instance over SSH from qrouter.
[root@network ~]# ip netns exec qrouter-3be9346b-9447-46d4-8222-f507be59357e ssh cirros@192.168.37.3
cirros@192.168.37.3's password:
$ hostname
my-first-instance
$ exit
Connection to 192.168.37.3 closed.
[root@network ~]#

[ DHCP namespace ]

[root@controller ~(keystone_user01)]# neutron net-list
+--------------------------------------+----------+-------------------------------------------------------+
| id                                   | name     | subnets                                               |
+--------------------------------------+----------+-------------------------------------------------------+
| b586f891-9821-4b0b-8d0e-b224b164383c | ext      | 96a2cf60-346d-4ad7-8975-89a4c8f19bb0 192.168.131.0/24 |
| f6d28e0c-0233-416e-a212-b1d36d4d3cbf | public   | 22f91b90-5c43-474e-8e01-b72ac359186e                  |
| ecc3c3f9-31bd-4998-a41d-b682b508bfb5 | internal | 37b936a4-cd4c-4565-9dee-2961cfc592c7 192.168.37.0/24  |
+--------------------------------------+----------+-------------------------------------------------------+
[root@controller ~(keystone_user01)]#

DHCP namespace for internal network.
[root@network ~]# ip netns exec qdhcp-ecc3c3f9-31bd-4998-a41d-b682b508bfb5 ip -4  a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
   inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
11: tap58c34b1f-66: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN
   inet 192.168.37.2/24 brd 192.168.37.255 scope global tap58c34b1f-66
      valid_lft forever preferred_lft forever
[root@network ~]#

[root@network ~]# ip netns exec qdhcp-ecc3c3f9-31bd-4998-a41d-b682b508bfb5 ip -4 r s
default via 192.168.37.1 dev tap58c34b1f-66
192.168.37.0/24 dev tap58c34b1f-66  proto kernel  scope link  src 192.168.37.2
[root@network ~]#

DHCP namespace for external network.
[root@network ~]# ip netns exec qdhcp-b586f891-9821-4b0b-8d0e-b224b164383c ip -4 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
   inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
18: tap89b14979-b3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN
   inet 192.168.131.130/24 brd 192.168.131.255 scope global tap89b14979-b3
      valid_lft forever preferred_lft forever

[root@network ~]# ip netns exec qdhcp-b586f891-9821-4b0b-8d0e-b224b164383c ip -4 r s
default via 192.168.131.1 dev tap89b14979-b3
192.168.131.0/24 dev tap89b14979-b3  proto kernel  scope link  src 192.168.131.130
[root@network ~]#

Here is a dnsmasq process for external network.
[root@network ~]# ps aux | grep dnsmasq | grep ap89b14979-b3 | grep -v grep
nobody   22575  0.0  0.0  15556   872 ?        S     9月14   0:00 dnsmasq --no-hosts --no-resolv --strict-order --except-interface=lo --pid-file=/var/lib/neutron/dhcp/b586f891-9821-4b0b-8d0e-b224b164383c/pid --dhcp-hostsfile=/var/lib/neutron/dhcp/b586f891-9821-4b0b-8d0e-b224b164383c/host --addn-hosts=/var/lib/neutron/dhcp/b586f891-9821-4b0b-8d0e-b224b164383c/addn_hosts --dhcp-optsfile=/var/lib/neutron/dhcp/b586f891-9821-4b0b-8d0e-b224b164383c/opts --dhcp-leasefile=/var/lib/neutron/dhcp/b586f891-9821-4b0b-8d0e-b224b164383c/leases --dhcp-match=set:ipxe,175 --bind-interfaces --interface=tap89b14979-b3 --dhcp-range=set:tag0,192.168.131.0,static,86400s --dhcp-option-force=option:mtu,1450 --dhcp-lease-max=256 --conf-file=/etc/neutron/dnsmasq-neutron.conf --domain=openstacklocal
[root@network ~]#

this is for internal network.
[root@network ~]# ps aux | grep dnsmasq | grep tap58c34b1f-66 | grep -v grep
nobody   22585  0.0  0.0  15556   956 ?        S     9月14   0:00 dnsmasq --no-hosts --no-resolv --strict-order --except-interface=lo --pid-file=/var/lib/neutron/dhcp/ecc3c3f9-31bd-4998-a41d-b682b508bfb5/pid --dhcp-hostsfile=/var/lib/neutron/dhcp/ecc3c3f9-31bd-4998-a41d-b682b508bfb5/host --addn-hosts=/var/lib/neutron/dhcp/ecc3c3f9-31bd-4998-a41d-b682b508bfb5/addn_hosts --dhcp-optsfile=/var/lib/neutron/dhcp/ecc3c3f9-31bd-4998-a41d-b682b508bfb5/opts --dhcp-leasefile=/var/lib/neutron/dhcp/ecc3c3f9-31bd-4998-a41d-b682b508bfb5/leases --dhcp-match=set:ipxe,175 --bind-interfaces --interface=tap58c34b1f-66 --dhcp-range=set:tag0,192.168.37.0,static,86400s --dhcp-option-force=option:mtu,1450 --dhcp-lease-max=256 --conf-file=/etc/neutron/dnsmasq-neutron.conf --domain=openstacklocal
[root@network ~]#

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.