Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Problem]: iobroker_startup.sh should respect traps #421

Closed
EugenMayer opened this issue Jan 5, 2024 · 3 comments
Closed

[Problem]: iobroker_startup.sh should respect traps #421

EugenMayer opened this issue Jan 5, 2024 · 3 comments

Comments

@EugenMayer
Copy link
Contributor

Description / Beschreibung

currently, when the iobroker process does not start due to issues (chown or others) the process is still running. While this is not an issue in itself and might be nice for debugging, the process does not longer respect kill signals since it has no trap.

This means if anything tells the container to shut down, it will not - the container will the be force fully killed after the "shutdown timeout / kill timeout" - this can be 60-120s of doing nothing.

We need to have a proper trap so the process ends right away (it does not need to wait for anything)

Image version

9.0.1

Docker logs / Docker Protokoll

-
@EugenMayer
Copy link
Contributor Author

I just understood that this issue only arises when one runs with DEBUG: true https://github.com/buanet/ioBroker.docker/blob/main/debian12/scripts/iobroker_startup.sh#L43 - otherwise the container exists directly.

I guess this gives this a way lower prio for sure, since nobody should run ioBroker with DEBUG in production, right? We could still add the trap though, but i would understand that this is only for the possible corner case.

@buanet
Copy link
Owner

buanet commented Jan 6, 2024

this can be 60-120s of doing nothing.

Not sure if I get this right. As i know, the default shutdown time (SIGTERM) for Docker is 10s. If the container hasn't exited after that, Docker will kill it.
True: After js-controller (the containers main process) is shut down, there is no more trap. This is intentional and I see no use case for that.

nobody should run ioBroker with DEBUG in production, right?

True: DEBUG is for generating debugging output and it slows down container startup. It should be disabled when not needed.

Maybe this will be solved too when we do #422.

By the way, when the iobroker process is not starting, I think you have other problems than a shutdown timeout and it is unreal to expect a graceful shutdown of the container. 😄

Regards,
André

@buanet
Copy link
Owner

buanet commented Apr 5, 2024

I'll close this issue, as it is not planned at the moment.

@buanet buanet closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants