praiskup / resalloc

Allocator and manager for (expensive) resources
GNU General Public License v2.0
7 stars 7 forks source link

taken tickets should trigger spawner #32

Open praiskup opened 4 years ago

praiskup commented 4 years ago

Even though I have this:

aws_x86_64_normal:
    max: 15
    max_starting: 5
    max_prealloc: 2
    tags:
    - copr_builder
    - arch_x86_64
    - arch_x86_64_native
    cmd_new: "/var/lib/resallocserver/resalloc_provision/vm-aws-new --arch=x86_64"
    cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-aws-delete"

And several (5+) tag-matching tickets are taken, only two builders are being started at the same time.

praiskup commented 4 years ago

Well, work-around is to have max_prealloc >= max_starting which is going to be our case anyways. So I'm marking this as an enhancement.

The challenge here is that multiple pools could match the taken ticket tags, and we shouldn't spin up resources unnecessarily in all the pools... Perhaps this is equivalent or similar to #24.