Child pages
  • Nectar: Neutron server failover procedure
Skip to end of metadata
Go to start of metadata

If there is a failure with the Neutron DHCP agent (running on ntr-neutronn*) or the server is down for some reason, you can manually fail over to the backup Neutron server. Be careful following these steps!

Step-by-step guide

Execute as Nectar admin from somewhere that has python open stack clients installed:

  1. Search networks for Auckland's to get IDs:
    root@ntr-pxe01:~# neutron net-list | grep auckland
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    | b97f545e-90fe-471f-8fde-a49491bd620f | auckland-public | 1803e237-cb6e-4713-b6f8-1fa6c79e33e8 130.216.216.0/22 |

  2. Search DHCP agents to find our IDs:

    root@ntr-pxe01:~# neutron agent-list | grep ntr-neutron | grep DHCP
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    | b91fa2d9-9505-46dd-a759-56c75fdee690 | DHCP agent | ntr-neutronn02 | nova | :-) | True | neutron-dhcp-agent |
    | d3646d75-8b64-4400-b999-5ce155056ab6 | DHCP agent | ntr-neutronn01 | nova | :-) | True | neutron-dhcp-agent |

  3. Check current DHCP agent:

    root@ntr-pxe01:~# neutron dhcp-agent-list-hosting-net b97f545e-90fe-471f-8fde-a49491bd620f
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    +--------------------------------------+----------------+----------------+-------+
    | id | host | admin_state_up | alive |
    +--------------------------------------+----------------+----------------+-------+
    | b91fa2d9-9505-46dd-a759-56c75fdee690 | ntr-neutronn02 | True | :-) |
    +--------------------------------------+----------------+----------------+-------+

  4. IMPORTANT: The next two commands need to be run ASAP together (say within 60-90 seconds), to make sure the whole address pool is transferred

    Remove DHCP network from ntr-neutron02

    root@ntr-pxe01:~# neutron dhcp-agent-network-remove b91fa2d9-9505-46dd-a759-56c75fdee690 b97f545e-90fe-471f-8fde-a49491bd620f
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    Removed network b97f545e-90fe-471f-8fde-a49491bd620f from DHCP agent

  5. Attach DHCP network to ntr-neutron01

    root@ntr-pxe01:~# neutron dhcp-agent-network-add d3646d75-8b64-4400-b999-5ce155056ab6 b97f545e-90fe-471f-8fde-a49491bd620f
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    Added network b97f545e-90fe-471f-8fde-a49491bd620f to DHCP agent

  6. Confirm DHCP is running on the new agent

    root@ntr-pxe01:~# neutron dhcp-agent-list-hosting-net b97f545e-90fe-471f-8fde-a49491bd620f
    neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
    +--------------------------------------+----------------+----------------+-------+
    | id | host | admin_state_up | alive |
    +--------------------------------------+----------------+----------------+-------+
    | d3646d75-8b64-4400-b999-5ce155056ab6 | ntr-neutronn01 | True | :-) |
    +--------------------------------------+----------------+----------------+-------+