码迷,mamicode.com
首页 > 其他好文 > 详细

neutron routers HA 实验

时间:2015-10-17 10:42:26      阅读:257      评论:0      收藏:0      [点我收藏+]

标签:

测试环境:

5个节点(( controller,2  network,2 compute nodes))

采用VXLAN+Linux Bridge

  1. 确定所有的neutron和nova服务都在运行

Nova service-list

Neutron agent-list

2. 创建2个networks

a)         neutron net-create private
neutron subnet-create –name private-subnet private 10.0.0.0/29

b)         neutron net-create private1
neutron subnet-create –name private1-subnet private1 10.0.1.0/29

 

3. 创建一个共享的public网络连接到物理网络physnet1

Neutron net-create –shared public –router:external=True –provide:network_type flat –provider:physical_network physnet1

Neutron subnet-create –name public-subnet public –allocation-pool start 172.16.0.33,end-172.16.0.66 –gateway=172.16.0.5 –enable-dhcp=False 172.16.0.0/24

4. 创建一个router,–distributed为 False, –ha 为True

Neutron router-create MyRouter –distributed False –ha True

 

5. 把private和private1加入到MyRouter,并设置router的网关到public网络

Neutron router-interface-add MyRouter private-subnet

Neutron router-interface-add MyRouter private1-subnet

Neutron router-gateway-set MyRouter public

6. 查看各种节点上的namespace

7. Open ICMP 和port 22 in security group

Neutron security-group-rule-create –protocol icmp –direction ingress default

Neutron security-group-rule-create –protocol tcp –port-range-min 22 –port-range-max 22 –direction ingress default

8. 启动VMs

nova boot –image cirros-qcow2 –flavor 1 –nic net-id=<private net is> private one

nova boot –image cirros-qcow2 –flavor 1 –nic net-id=<private net is> private two

nova boot –image cirros-qcow2 –flavor 1 –nic net-id=<private1 net is> private1 three

nova boot –image cirros-qcow2 –flavor 1 –nic net-id=<private1 net is> private1 four

9. Neutron port-list

10. Add floating IP

网络节点上:

Neutron floatingip-create –port-id=<port ID>

11. Neutron net-list

注意:HA network已经自动创建了。如何创建的

12. Keepalived用来监控每个HA router,VIP会随着master failes而移动

Ssh networknode

Less /var/lib/neutron/ha_confs/router_UUDI/keepalived.conf

Less /var/lib/neutron/ha_confs/router_UUDI/state

13. 看看qrouter namespace中VIP在那个node上

Networknode1$ Ip netns exec qrouter-id ip a

Networknode2$ Ip netns exec qrouter-id ip a

14. Down 所有active router上的interfaces,VIP移动到了另外的node上了。(router不能直接down掉?)

Ip netns exec qgouter-id  ip link set dev qg-id down

Ip netns exec qrouter-id  ip link set dev qg-id down

Ip netns exec ha-id  ip link set dev qg-id down

15. Up 刚才down了接口,VIP没有移动

 

注意:由于bug1365476, HA routers在L2 pop的情况下不工作。(VXLAN不works

 

neutron routers HA 实验

标签:

原文地址:http://www.cnblogs.com/allcloud/p/4886956.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!