Slot can be reserved from unready instances
When taskscaler is initialised, it gives the caller the chance to delete pre-existing instances, which is sometimes the safest thing to do if you cannot determine the state of the existing instances (they may have already been used).
There's a race here though, where the schedule (and preemptive mode) hasn't been correctly activated before a call to Reserve()
. This can lead to having a reservation in preemptive mode where the instance is not ready. This is due to the active schedule not immediately being calculated when ConfigureSchedule
is called, but there's no reason it cannot be.
Edited by Arran Walker