Switch periodic tasks to the Futurist library


Futurist is a new Oslo library providing tools for writing asynchronous code. This spec suggests switching our periodic task implementation to Futurist to solve some long-standing problems.

Problem description

The main problem with our current implementation is that we run all periodic tasks in one thread. Any task that blocks for a while would block all other tasks from executing, and it happens pretty often with tasks checking power states via IPMI.

Switch to Futurist will allow executing all tasks in parallel.

Proposed change

  • Modify conductor to use Futurist library instead of implementation from oslo incubator.

    Existing worker pool will be reused for periodic tasks. So, existing option workers_pool_size will set maximum number of tasks to run in parallel at every moment of time.

  • Switch all use cases of ironic.openstack.common.periodic_task to Futurist decorators, and drop this module.

  • Switch ironic.drivers.base.driver_periodic_task to using Futurist decorators internally and deprecate it.


  • We could fix existing implementation. That’s not actually easier, as it requires essentially rewriting it.

Data model impact


State Machine Impact


REST API impact


Client (CLI) impact


RPC API impact


Driver API impact

  • Old way of creating driver periodic tasks will be deprecated, drivers should eventually switch to using Futurist decorators.

Nova driver impact


Ramdisk impact


Security impact


Other end user impact


Scalability impact

  • Overall positive impact on scalability expected, as every Ironic conductor will be able (at least theoretically) to manage more IPMI nodes.

Performance Impact

  • A periodic tasks performance will no longer affect timing of other periodic tasks.

Other deployer impact


Developer impact




Primary assignee:

Dmitry Tantsur (irc: dtantsur, lp: divius)

Work Items

  • Change conductor manager to use Futurist

  • Modify driver_periodic_task to use Futurist internally


The only big dependency is Futurist itself. At the moment of writing it didn’t see an official release yet, but is moving pretty fast and all required code already landed in git master.


Unit tests should already cover this functionality. Specific tests ensuring parallelization will be added.

Upgrades and Backwards Compatibility


Documentation Impact

Documentation of driver periodic tasks should be updated to mention Futurist instead of ad-hoc implementation.