fireball timer extension

Since different plays may have different runtimes (and the same task might take longer on different hosts) the same fireball timer duration may not work for all cases. Having an extremely long duration isn’t too great since the port will be left open for an unnecessarily long period when the play run time is short.

I’ve tested out the following approach to solve this:

  • set n = 0.01

  • if timer is about to expire (time consumed > 90% of timer duration)

  • extend timer duration by n * original duration

  • set n to sqrt(n)

The changeset can be reviewed at https://github.com/alisaifee/ansible/commit/ea9efe0cc4caf62223ea24755c0a1629a758c44d

This way the first few extensions are not too large. If there are a lot of extensions, the value will get clamped to at max the original timer duration.

The cases that I can think of which would still fail:

  • if the run time of a single sync task is > timer duration

  • the poll frequency of an async task > the minimum timer extension

This is something we’ve considered and may be implementing, but fireball is being upgraded at the moment so this is probably not a good time.

However, as expiration is a feature and is important, and we don’t want to leave these running, we want to tread carefully here.

Rekeying must also be taken into effect.