diff --git a/ironic/conductor/manager.py b/ironic/conductor/manager.py index 5d70720690..f58705551d 100644 --- a/ironic/conductor/manager.py +++ b/ironic/conductor/manager.py @@ -1642,12 +1642,12 @@ class ConductorManager(base_manager.BaseConductorManager): for node_info in self.iter_nodes(fields=['id'], filters=filters): nodes.put(node_info) - number_of_threads = min(CONF.conductor.sync_power_state_workers, + number_of_workers = min(CONF.conductor.sync_power_state_workers, CONF.conductor.periodic_max_workers, nodes.qsize()) futures = [] - for thread_number in range(max(0, number_of_threads - 1)): + for worker_number in range(max(0, number_of_workers - 1)): try: futures.append( self._spawn_worker(self._sync_power_state_nodes_task, @@ -1656,7 +1656,7 @@ class ConductorManager(base_manager.BaseConductorManager): LOG.warning("There are no more conductor workers for " "power sync task. %(workers)d workers have " "been already spawned.", - {'workers': thread_number}) + {'workers': worker_number}) break try: diff --git a/ironic/conf/conductor.py b/ironic/conf/conductor.py index 91d902d504..99d2d81933 100644 --- a/ironic/conf/conductor.py +++ b/ironic/conf/conductor.py @@ -78,9 +78,9 @@ opts = [ 'in DB')), cfg.IntOpt('sync_power_state_workers', default=8, min=1, - help=_('The maximum number of workers that can be started ' - 'simultaneously to sync nodes power state from the ' - 'periodic task.')), + help=_('The maximum number of worker threads that can be ' + 'started simultaneously to sync nodes power states from ' + 'the periodic task.')), cfg.IntOpt('periodic_max_workers', default=8, help=_('Maximum number of worker threads that can be started ' diff --git a/releasenotes/notes/add-parallel-power-syncs-b099d66e80aab616.yaml b/releasenotes/notes/add-parallel-power-syncs-b099d66e80aab616.yaml index c77a48274c..90cc174d3f 100644 --- a/releasenotes/notes/add-parallel-power-syncs-b099d66e80aab616.yaml +++ b/releasenotes/notes/add-parallel-power-syncs-b099d66e80aab616.yaml @@ -1,9 +1,8 @@ --- features: - | - Parallelizes periodic power sync calls by running up to - ``sync_power_state_workers`` simultenously. The default is to run - up to ``8`` workers. - This change should let larger-scale setups to run power syncs more - frequently and make the whole power sync procedure more resilient to slow - or dead BMCs. + Parallelizes periodic power sync calls by running up to ironic + configuration ``[conductor]/sync_power_state_workers`` simultaneously. + The default is to run up to ``8`` workers. This change should let + larger-scale setups running power syncs more frequently and make the whole + power sync procedure more resilient to slow or dead BMCs.