Accept allocation of 0 jobs
authorKlaus Aehlig <aehlig@google.com>
Fri, 7 Aug 2015 15:57:34 +0000 (17:57 +0200)
committerKlaus Aehlig <aehlig@google.com>
Fri, 7 Aug 2015 16:34:46 +0000 (18:34 +0200)
commit08c5120e6b6e02a115264e8f48d70e38144db188
tree175acef0a1979b0c671fd52150ada50bc28cce64
parent29ae208439b4b39255e1b059a7e9b1a900e9231b
Accept allocation of 0 jobs

However, short-cut them and return the empty list
directly, as we do not need to do any change to the
serial file.

Note that allocating 0 jobs has legitimate use cases,
like gnt-node migrate on an empty node. Doing so
without complaining in line with the behaviour of
earlier Ganeti versions.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
src/Ganeti/JQueue.hs