From 9b4e2f94b4efb2407f7c9e8d7702e14d680c2b34 Mon Sep 17 00:00:00 2001 From: Sahid Orentino Ferdjaoui Date: Thu, 1 Feb 2024 12:18:00 +0100 Subject: [PATCH] neutron: adds elements regardings neutron dhcp agent az aware Change-Id: Ife47a45740c35e431a3d72709f6a91fce4c9dab7 Signed-off-by: Sahid Orentino Ferdjaoui --- doc/source/journey/configure/index.rst | 2 + doc/source/journey/configure/neutron.rst | 21 ++++++ .../neutron/neutron-dhcp-agents-azaware.rst | 66 +++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 doc/source/journey/configure/neutron.rst create mode 100644 doc/source/journey/configure/neutron/neutron-dhcp-agents-azaware.rst diff --git a/doc/source/journey/configure/index.rst b/doc/source/journey/configure/index.rst index ef4014c..5595e07 100644 --- a/doc/source/journey/configure/index.rst +++ b/doc/source/journey/configure/index.rst @@ -10,6 +10,7 @@ Contents: rabbitmq database other + neutron-dhcp-agents-azaware --------- Configure @@ -25,6 +26,7 @@ Once your cluster is properly configured to handle scale, you can go to the seco Resources --------- +* :doc:`Large Scale Configuration guidelines for Neutron ` * :doc:`Large Scale Configuration guidelines for RabbitMQ ` * :doc:`Large Scale Configuration guidelines for Database ` * :doc:`Large Scale Configuration guidelines (other/extra) ` diff --git a/doc/source/journey/configure/neutron.rst b/doc/source/journey/configure/neutron.rst new file mode 100644 index 0000000..234b2db --- /dev/null +++ b/doc/source/journey/configure/neutron.rst @@ -0,0 +1,21 @@ +================================================ +Large Scale Configuration guidelines for Neutron +================================================ + +Introduction +------------ + +This document gathers information and references regarding large-scale +configuration for Neutron. + + +Neutron Agents +-------------- + +* :doc:`Neutron DHCP Agents AZ Awareness ` + + +Stories +------- + +* :doc:`Various latency issues from Société Générale ` diff --git a/doc/source/journey/configure/neutron/neutron-dhcp-agents-azaware.rst b/doc/source/journey/configure/neutron/neutron-dhcp-agents-azaware.rst new file mode 100644 index 0000000..bd9ab49 --- /dev/null +++ b/doc/source/journey/configure/neutron/neutron-dhcp-agents-azaware.rst @@ -0,0 +1,66 @@ +Neutron DHCP Agents Availability Zone Awareness +=============================================== + +In large deployments requiring High Availability, it is crucial to ensure +that the network agents and in particular for this document, the DHCP +agent, run on different Availability Zones. + +Nova AZ is not Neutron AZ +------------------------- + +Logically, an AZ is the same concept between Nova and Neutron, but +functionally, they do not have any relation. This means that when you +define AZ in Nova, it does not impact Neutron. + +By default, the `BaseWeightScheduler` schedules networks on DHCP +Agents independently of the related AZ. Even if you set AZ hints for a +network, the scheduler will select agents with the fewest networks to +handle to fulfill the `dhcp_agents_per_network` requirement. + +For example, if you configure `dhcp_agents_per_network = 2` and deploy +2 agents in AZ1 and 2 agents in AZ2, the scheduler may schedule the +first network (net1) on both DHCP agents in AZ1 and the second network +on those in AZ2. + +This situation is not desirable, as if something goes wrong in AZ1, +network net1 can be unreachable. + +AZAwareWeightScheduler +---------------------- + +Neutron provides a solution to make the scheduler comprehend AZs +better. To achieve this, configure Neutron to use +`AZAwareWeightScheduler`. + +.. code-block:: ini + + network_scheduler_driver = neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler + dhcp_load_type = networks + +Now, the scheduler understands AZs. + +The next step is to ensure that all networks are scheduled on both +AZs. Set the default_availability_zones to include both AZs. + +.. code-block:: ini + + default_availability_zones = AZ1, AZ2 + +It is also possible to add more granularity for a network by setting +hints: + +For example, if you want a network to be scheduled in a specific zone, +say AZ3: + +.. code-block:: bash + + openstack network create --availability-zone-hint AZ3 + +Conclusion +----------- + +In conclusion, configuring Neutron to be AZ-aware for its agents, +particularly the DHCP agent in the context of this document, is +relatively straightforward. It requires minimal and non-excessive +changes, yet it can significantly elevate your environment to a higher +level of robustness and High Availability.