ganeti-github-testing/ganeti-test-1 — pull request #28 by nh2 (2014-10-08 14:45:54+00:00)
Title: ReasonRateLimiting: Fix scheduling rate-limited jobs

The semantics change in the SlotMap simplification (commit 7a3aa19)
purposely made `hasSlotsFor`/`occupySlots` reject keys that were not
in the SlotMap, for example

[] `hasSlotsFor` [("key", 1)] == False

Unfortunately, I forgot to adjust the `initSlotMap` in `reasonRateLimit`:
While before it was allowed to start empty (`occupySlots` would create
the slots on the fly), commit 7a3aa19 should have changed it to start
with all keys present and set to all buckets unoccupied.

This led to all jobs with a `rate-limit:n:...` reason to be
rate-limited unconditionally (they were never run).

This commit fixes it by adjusting `initSlotMap` as described above.

Signed-off-by: Niklas Hambuechen