Openstack Mitaka - 不同网络段上的网络控制器和计算节点

Openstack Mitaka - 不同网络段上的网络控制器和计算节点

我对 Openstack 还不太熟悉,对高级网络概念的了解非常有限。我正尝试按照官方安装指南为工作设置一个简单的 Openstack Mitaka 设置。我以为我取得了很大的进步,直到我到达网络部分。

我有以下配置:

  1. 10.110 上的 VMWare 虚拟机上的单个控制器节点。166.XXX子网 - 有 2 个 NIC
  2. 10.110 上的裸机服务器上的单个计算节点。167.XXX子网 - 有 2 个 NIC

我在控制器上部署了 Keystone、Nova、Glance 和 Neutron 组件。在计算节点上部署了 Nova-compute 服务和 linuxbridge-agent。尝试使用安装指南中推荐的 ML2 插件来设置网络。

按照列出的所有说明操作后,我似乎无法 ping 任何从我的计算节点或控制器节点启动的 VM 实例。这也可能是我无法获得与实例的 VNC 控制台连接的原因。我可以清楚地看到我的网络设置是错误的,因为我的 Ubuntu 实例在启动时卡住了,等待网络接口启动。

我多次在 Openstack 中重新创建网络设置,但都没有成功。目前,我已经清除了所有内容,并且 Neutron 中没有定义任何提供商或任何其他网络。如果有人能指导我完成这个过程,我将不胜感激。

我怀疑是否可以将控制器和计算节点放在不同的 LAN 段上。尚未找到解决方案。

根据这个输出判断,到目前为止设置似乎很好:

neutron agent-list
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
| id                                   | agent_type         | host       | availability_zone | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+
| 11ff8610-8eb2-45d5-91e8-d7905beb668c | Linux bridge agent | controller |                   | :-)   | True           | neutron-linuxbridge-agent |
| 370794ac-0091-4908-8293-00d007f7f8be | Linux bridge agent | compute1   |                   | :-)   | True           | neutron-linuxbridge-agent |
| 444eca8d-3a34-4018-97ab-f23925e65713 | DHCP agent         | controller | nova              | :-)   | True           | neutron-dhcp-agent        |
| 90f70ca7-afd2-4127-97f1-f623fac26e29 | Metadata agent     | controller |                   | :-)   | True           | neutron-metadata-agent    |
| ad2a6012-a348-47c7-8ee9-f41401fb048f | L3 agent           | controller | nova              | :-)   | True           | neutron-l3-agent          |
+--------------------------------------+--------------------+------------+-------------------+-------+----------------+---------------------------+

我添加了下面的配置,可能有助于解决此问题。

控制节点:

/etc/网络/接口

# The loopback network interface
auto lo
iface lo inet loopback

# The provider network interface
auto ens192
iface ens192 inet manual
up ip link set dev $IFACE up
down ip link set dev $IFACE down

# primary network interface
auto ens160
iface ens160 inet dhcp

ifconfig 的输出:

ens160    Link encap:Ethernet  HWaddr 00:50:56:99:c5:74
          inet addr:10.105.166.87  Bcast:10.105.166.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe99:c574/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:995476 errors:0 dropped:0 overruns:0 frame:0
          TX packets:639007 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:578268831 (578.2 MB)  TX bytes:522577815 (522.5 MB)

ens192    Link encap:Ethernet  HWaddr 00:50:56:99:14:d4
          inet6 addr: fe80::250:56ff:fe99:14d4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23276 errors:0 dropped:292 overruns:0 frame:0
          TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1697881 (1.6 MB)  TX bytes:1988 (1.9 KB)
          Interrupt:19 Memory:fd3a0000-fd3c0000

路线-n:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.105.166.251  0.0.0.0         UG    0      0        0 ens160
10.105.166.0    0.0.0.0         255.255.255.0   U     0      0        0 ens160

/etc/neutron/plugins/ml2/linuxbridge_agent.ini: [linux_bridge]

#
# From neutron.ml2.linuxbridge.agent
#

# Comma-separated list of <physical_network>:<physical_interface> tuples
# mapping physical network names to the agent's node-specific physical network
# interfaces to be used for flat and VLAN networks. All physical networks
# listed in network_vlan_ranges on the server should have mappings to
# appropriate interfaces on each agent. (list value)
physical_interface_mappings = provider:ens192

# List of <physical_network>:<physical_bridge> (list value)
#bridge_mappings =


[vxlan]

#
# From neutron.ml2.linuxbridge.agent
#

# Enable VXLAN on the agent. Can be enabled when agent is managed by ml2 plugin
# using linuxbridge mechanism driver (boolean value)
enable_vxlan = True
local_ip = 10.105.166.87
l2_population = True

计算节点:

在 /etc/网络/接口:

# The provider network interface
auto eno1
iface eno1 inet manual
up ip link set dev $IFACE up
down ip link set dev $IFACE down

# main network
auto enp4s0f3
iface enp4s0f3 inet dhcp

ifconfig:

eno1      Link encap:Ethernet  HWaddr 00:1e:67:d8:ae:36
          inet6 addr: fe80::21e:67ff:fed8:ae36/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:62075 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10075695 (10.0 MB)  TX bytes:648 (648.0 B)
          Memory:91920000-9193ffff

enp4s0f3  Link encap:Ethernet  HWaddr 00:1e:67:d8:ae:37
          inet addr:10.105.167.134  Bcast:10.105.167.255  Mask:255.255.255.0
          inet6 addr: fe80::21e:67ff:fed8:ae37/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:358572 errors:0 dropped:0 overruns:0 frame:0
          TX packets:243401 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:203461227 (203.4 MB)  TX bytes:75659105 (75.6 MB)
          Memory:91900000-9191ffff

路线-a:

root@compute1:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.105.167.251  0.0.0.0         UG    0      0        0 enp4s0f3
10.105.167.0    0.0.0.0         255.255.255.0   U     0      0        0 enp4s0f3

/etc/neutron/plugins/ml2/linuxbridge_agent.ini:

[linux_bridge]


#
# From neutron.ml2.linuxbridge.agent
#

# Comma-separated list of <physical_network>:<physical_interface> tuples
# mapping physical network names to the agent's node-specific physical network
# interfaces to be used for flat and VLAN networks. All physical networks
# listed in network_vlan_ranges on the server should have mappings to
# appropriate interfaces on each agent. (list value)
physical_interface_mappings = provider:eno1

# List of <physical_network>:<physical_bridge> (list value)
#bridge_mappings =


[securitygroup]

#
# From neutron.ml2.linuxbridge.agent
#

# Driver for security groups firewall in the L2 agent (string value)
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

就网络设置而言,我的目标如下:

1) 我不想再使用物理网络上的任何 IP 2) VM 实例将在虚拟化网络段上分配 IP 3) 某种覆盖网络允许它们相互连接 4) 需要网络连接互联网

我一直在阅读有关 OpenVSwitch 及其用法的文章,但它看起来相当复杂,我不确定是否需要真正投入精力来完成此设置。我希望得到一些关于如何设置的指导。

非常感谢您的帮助。谢谢!

相关内容