Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Kill old jobs on start #253

@puiterwijk

Description

@puiterwijk

At this moment, if Benefice gets restarted for whatever reason (config update, new version, etc), it will leave existing workloads running, and those will never get killed.
We should make sure Benefice kills all old jobs.

Some example ideas:

  • Add a docker label with the calculated termination timestamp for a job (this would also ensure that everything gets killed the same way: we could get rid of the in-process timer).
  • Store the fact that a container was started by Benefice, and on start, just kill all existing Benefice-started jobs.
  • Possibly others...

I personally think the first idea might be best, as it would simplify code quite a bit possibly, and also avoids other bugs that'd avoid jobs not getting killed.

The actual killing of jobs could even become an external script that just gets executed by a systemd timer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions