-
Notifications
You must be signed in to change notification settings - Fork 69
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
[Feature Request]: Disable keep-alive feature for containers, when not in maintenance mode #422
Comments
Since this behavior is intentional, it is not a bug but a feature request. Regards, |
The issue is not limited to satellite instances, since any instance, that somehow crashes, has this fate. |
It is not as easy as it sounds. |
Calling it yourself "the hacky way" sounds like an ideal candidate for deprecation, especially since this is in this very containers documentation, that can easily be modified ;) Anyhow, I propose two ideas: Method1: One way would be making users aware about the maintenance mode via a shutdown message:
This can be of course written in a better way - including links to the docs. This would nudge people towards using maintenance mode. Method2: If you on the other hand would like to keep things the way they are (for now), I propose an ENV variable (e.g. IOB_MAINTENANCE_MODE_MANDATORY):
I think, the second approach would satisfy both of us, even though it wouldn't fix the underlying issue. |
deprecation sounds good, but your are not the one answering the questions and issues of people not reading the docs or changelogs...
No. I would not support the idea of another env for this. In the end the container has to stay administrable and supportable. Every new env makes it more complicated. Your idea is stated here as enhancement. We will see. Regards, |
If you echo a message to /dev/pts/0, it would appear on a users screen, if he entered the container in interactive and terminal mode (docker exec -it /bin/bash). One can even loop over multiple /dev/pts/* devices to send the message to all ttys, that have been spawned when entering the container.
I can understand that you want to keep complexity and workarounds as low a possible, which is a good thing IMHO. Another method would be running iobroker via s6 and ensuring, that it keep running on a crash. But I yet have to come around with an idea on how to identify, if a user purposely "crashed" it via For the mean time, I wrote my own Docker container to mitigate crashes, since for an unknown reason, my satellite keeps on crashing randomly for the same reason all the time (sometimes it runs for weeks, sometimes just a few days or only hours). FROM buanet/iobroker:latest
# WORKAROUND to disable maintenance mode keep-alive (+ reminder for myself, that I disabled it)
RUN sed -i '/^gosu iobroker tail/d' /opt/scripts/iobroker_startup.sh && echo 'if [ -c "/dev/pts/0" ]; then echo "ioBroker has stopped working. If you intended to perform maintenance such as upgrading the js-controller, use \"maintenance on\" before and \"maintenance off\" after your intended action" > /dev/pts/0; fi' >> /opt/scripts/iobroker_startup.sh This basically modifyes the iobroker_startup.sh script such that instead of echo "ioBroker has stopped working. If you intended to perform maintenance such as upgrading the js-controller, use \"maintenance on\" before and \"maintenance off\" after your intended action" > /dev/pts/0; fi' |
Description / Beschreibung
When ioBroker crashes, the container keeps running. This is a side effect of maintenance mode, as one can see on this line.
If the container keeps running, even though ioBroker crashed, the docker daemon will not automatically restart the container (if configured so).
One should therefore either make sure, that ioBroker automatically restarts, when it crashes or make the container stop running in that case.
Backgroud: I have two ioBroker instances, my main instance running on my server (incl. redis for states and objects) and a satellite. When the satellite loses connection (restart of main server or loss of network), it times out and ioBroker simply stops running and leaves behind an "empty container".
Image version
v8.1.0
Docker logs / Docker Protokoll
The text was updated successfully, but these errors were encountered: