ArmyCyberInstitute / cmgr

CTF Challenge Manager
Apache License 2.0
17 stars 9 forks source link

Reboot policy is unbounded #42

Open jrolli opened 2 years ago

jrolli commented 2 years ago

Issue

The current template for starting challenges uses a reboot on-failure setting. This can have disastrous effects on stability if multiple challenges that exit immediately on start somehow get started (note: these challenges should be rewritten to not do this, but also not the point) as they start dominating system resources in the container startup process.

Solution

Find and set the knob for "max attempts" so that it gets bounded at a reasonable number of restarts.

jrolli commented 2 years ago

Offending line in code is here: https://github.com/ArmyCyberInstitute/cmgr/blob/b37c5bfad3a8fcfeef32e94b92d804f29a6d08a8/cmgr/docker.go#L673