allow discover host to be enabled in multiple schedulers

This change allows the nova-scheduler `discover hosts` periodic task
to be enabled on multiple scheduler instances without racing.

This is done by modifying the periodic to do a very simple form
of leader election.

implements: blueprint distributed-host-discovery
Change-Id: I96d74981e1cff8cc1fce4a74c8db3f7d58e20f33
This commit is contained in:
Sean Mooney
2025-01-06 21:21:31 +00:00
parent c3250d23a7
commit e98393c5c2
3 changed files with 86 additions and 11 deletions
@@ -0,0 +1,12 @@
---
features:
- |
The nova scheduler now supports enabling the nova cell discover hosts
perodic task on multiple schedulers. In prior release enabling this
feature required setting the discover_hosts_in_cells_interval option
to a value greater than 0 in at most one scheduler, with the 2025.1
release it was possible to enable the feature on multiple schedulers
via the introduction of leader election. This simplifies deployment
of nova in kubernetes by allowing the operator to deploy
multiple schedulers and have them elect a single leader that will run
the discover hosts perodic task.