Currently, hash ring reset is done as part of sync_local_state periodic task [1].
But, for certain use cases, cloud admin will not be interested in running the sync_local_state periodic task and take over of active nodes by new conductor [2].
But, if sync_local_state is disabled, we will lose out on hash ring reset as well.
That will stop the dynamic redistribution of ironic nodes mapping to conductor [3] and will affect other periodic power sync jobs as well.
So, it would be good if hash ring rest is done as part of the mapping call itself and not tied to sync_local_state.
[1] - https://github.com/openstack/ironic/blob/master/ironic/conductor/manager.py#L1408
[2] - https://github.com/openstack/ironic/blob/master/ironic/conductor/manager.py#L1432
[3] - https://github.com/openstack/ironic/blob/master/ironic/conductor/manager.py#L1443
Talked about this in IRC some; we think the best solution is probably:
* Remove the reset from sync_local_state
* Keep track of when the ring was last refreshed
* In the code that checks if the ring is set, also check the age and rebuild if older than $config