For various reasons, you might need to migrate routers and dhcp agents.
For dhcp, they are already multiple and due to lease-timeout,  the migration is not noticable

For routers, the downtime might be noticable from anywhere between 5 seconds to a minute as the ports will be recreated.

Here is an example of such a migration ( suppose I want to do maintenance on C16 ) , or I want to migrate a router from a tenant.

neutron router-list

neutron l3-agent-list-hosting-router 59aa2d3c-1c84-4988-95f2-eca0740a3750

its on c16 .. i want maintenance on c16.

neutron l3-agent-router-remove 977a01f8-e8c8-420f-9757-1d5be5f3e0fc  59aa2d3c-1c84-4988-95f2-eca0740a3750

neutron l3-agent-list-hosting-router 59aa2d3c-1c84-4988-95f2-eca0740a3750

\o/ moved to c14.
Do maintanence on c16, or create another one .. add back 🙂
neutron l3-agent-router-add 977a01f8-e8c8-420f-9757-1d5be5f3e0fc  59aa2d3c-1c84-4988-95f2-eca0740a3750

neutron l3-agent-list-hosting-router 59aa2d3c-1c84-4988-95f2-eca0740a3750

root@c14_neutron_agents_container-51938465:~# ip netns

neutron net-list

I network I want to migrate is officeNet

neutron dhcp-agent-list-hosting-net c4520434-aea7-4263-b714-ac0b6fcdc57a

Follow similar procedure for DHCP as well

Summary:

neutron agent-list

Please note IDs of  L3 agent and DHCP agent.

When you migrate networks ( as in dhcp and routers ) you migrate (add/remove) DHCP to a DHCP agent  and migrate router to a L3 agent

About The Author