openstack router 在网络节点间迁移

gtw03 节点挂掉,导致该 L3 agent 上的 router router3 失联,导致连接该 router 的 vm 失联

目的:将 router3 迁移到 gtw02

1、查看 router

[root@k8s01 ~]# neutron router-list

2、查看 router 对应的 L3 agent host

[root@k8s01 ~]# neutron l3-agent-list-hosting-router router3
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+--------------------------------------+-----------+----------------+-------+----------+
| id                                   | host      | admin_state_up | alive | ha_state |
+--------------------------------------+-----------+----------------+-------+----------+
| 73bf0dbf-0365-490a-a852-252b11681bdb | uat-gtw03 | True           | xxx   |          |
+--------------------------------------+-----------+----------------+-------+----------+

xxx 表示 host down,这个不怎么准确,最好多刷新几次

3、查看所有的 L3 agent

[root@k8s01 ~]# neutron agent-list | grep L3
..

4、删除 router3

[root@k8s01 ~]# neutron l3-agent-router-remove 73bf0dbf-0365-490a-a852-252b11681bdb router3
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Removed router router3 from L3 agent

openstack 自动将 router3 迁移到 uat-gtw01 节点

[root@k8s01 ~]# neutron l3-agent-list-hosting-router router3

5、删除网络节点(** 慎重 **)

停止节点

[root@k8s01 ~]# neutron agent-list | grep uat-gtw03
[root@k8s01 ~]# neutron agent-update 73bf0dbf-0365-490a-a852-252b11681bdb --admin-state-down
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Updated agent: 73bf0dbf-0365-490a-a852-252b11681bdb
[root@k8s01 ~]# neutron agent-list | grep uat-gtw03
...

删除节点

[root@k8s01 ~]# neutron agent-delete 73bf0dbf-0365-490a-a852-252b11681bdb
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Deleted agent(s): 73bf0dbf-0365-490a-a852-252b11681bdb
[root@k8s01 ~]# neutron agent-list | grep uat-gtw03
...

下面依次删除 uat-gtw03 节点上的 neutron-lbaasv2-agent、neutron-openvswitch-agent、 neutron-metadata-agent、neutron-dhcp-agent

[root@k8s01 ~]# neutron agent-delete 8eae073a-232a-45fc-a25d-a49846faebca
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Deleted agent(s): 8eae073a-232a-45fc-a25d-a49846faebca
[root@k8s01 ~]# neutron agent-delete 96743b09-588f-462c-8a64-5368aba7382a
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Deleted agent(s): 96743b09-588f-462c-8a64-5368aba7382a
[root@k8s01 ~]# neutron agent-delete a1b6906d-ac09-41f1-88a4-a1137bcf6d8b
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Deleted agent(s): a1b6906d-ac09-41f1-88a4-a1137bcf6d8b
[root@k8s01 ~]# neutron agent-delete cdc2ad81-0bc2-4569-84ea-28476823db6f
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Deleted agent(s): cdc2ad81-0bc2-4569-84ea-28476823db6f

参考文章:

https://cloud.garr.it/support/kb/openstack/migrate_virtual_router/;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值