SystemRage / py-kms

KMS Server Emulator written in Python
The Unlicense
2.07k stars 634 forks source link

Fix docker 100% cpu load #51

Closed simonmicro closed 4 years ago

simonmicro commented 4 years ago

This addresses issue #38 - but for docker only.

The problem is that our py-kms tries to use an invalid shell (which is provided by docker or even systemd sometimes) and therefore loops indefinitely. This patch forces docker to provide a valid shell (see here), which should be a acceptable fix for the problem.

The best solution would be to modify py-kms directly by checking at startup for a valid shell (this would then fix this bug for any problematic environment), but this can be really hard (because sometimes we would have a valid shell but e.g. the /dev/null as input).

vosdev commented 4 years ago

Tested & can confirm that this solves the CPU issues from #38