Comments (7)
Yes, I'm planning to merge it. I've just been a little busy lately and haven't had enough time to dedicate to Tini, but I'll be doing a release soon including #75 and #107.
from tini.
I did a shot at it here:
I won't make a pull request, since I'm not even close to write good enough C.
from tini.
I think this is reasonable to add as long as I can keep the implementation minimal (in fact I've run into exactly this issue myself with Elasticsearch).
I'm not a huge fan of parsing an ENV variable for this, and I'd rather for this to be a CLI flag (for now I've reserved ENV vars for things that you'd want to be able to configure even if you're not directly writing the code that starts Tini).
Implementation-wise, I'm probably going to rely on a bitfield representing all possible exit codes and whether they should be re-mapped to 0. This will avoid dynamic memory allocation, and use very little memory overall (we only need 256 bits total to represent this).
from tini.
Still a bit of polishing to do, but here's what I had in mind: expect-status-code You'd use the -e
flag to ignore a given exit code.
from tini.
@nixx @krallin we've faced the same issue, but with Marathon and Kubernetes.
Our Java component runs as a daemon, listens for messages from RabbitMQ and processes them. Everything works great, except the case, when we need to stop this daemon via deleting the Pod. As we know, orchestrator triggers SIGTERM in such cases and waits for process dies.
The problem is that JVM handles SIGTERM and exits with code 128 + 15 (SIGTERM) = 143 which is not 0, obviously. So, Kubernetes decides to start this Pod again (backoff), thinking that the last time process died abnormally.
My question here is, do you have any plans on merge the PR which allows to map exit codes to 0?
Or, there is another solution for such cases?
from tini.
@krallin this are awesome news. Kudos to you for maintaining this project even after it was included in Docker itself. Do you have an ETA for the release?
from tini.
Probably this week. That said, if you have an urgent need to use either of these features, building Tini yourself is not particularly complex (and documented in the README).
from tini.
Related Issues (20)
- ownership of /proc/1/* is root even the user is non-root HOT 3
- Support setuid and setguid before execute command?
- Supress TRACE but show DEBUG HOT 1
- Event not generated when File change happens HOT 1
- About Tini version planning? HOT 2
- aarch64 version available? HOT 3
- Non-terminal signals are killing containers running with --init flag HOT 3
- stack-protector not work HOT 4
- [FATAL tini (7)] exec bash failed: No such file or directory HOT 3
- [CVE-2023-25139]tini-static executable seems vulnerable HOT 1
- example / explanation HOT 1
- How can I confirm that tini is running? HOT 1
- prctl(PR_SET_PDEATHSIG, ...) should be called after fork(), not before HOT 4
- MI6&termux&clang-16 build failed HOT 2
- Using "docker run --init" with arguments to tini HOT 2
- tini docker windows container HOT 1
- Command-line parsing is broken if compiled with TINI_MINIMAL
- tini not running as child subreaper on AWS Lambda HOT 4
- dnf/rpm install -y tini not working HOT 1
- Latest release changed to 0.18. then switched back to 0.19 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tini.