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

"White label" when MINIMAL is set #60

Merged
merged 6 commits into from
Nov 4, 2016
Merged

"White label" when MINIMAL is set #60

merged 6 commits into from
Nov 4, 2016

Conversation

krallin
Copy link
Owner

@krallin krallin commented Nov 4, 2016

Hey @crosbymichael,

Here's a proposed implementation for what I suggested in #59 — let me know what you think. I also fixed a few issues with the current NO_ARGS implementation (namely: we were still showing the args in Usage).

Let me know what you think, with this patch, if you run an unknown command, you get:

root@1693b2f7195c:/# /dist/tini xx
exec xx failed: No such file or directory

I incorporate your status code changes, and added tests. I haven't been able to get ENOEXEC to show up (I tested with a binary from the wrong architecture, and with a shebang that points to nowhere), so I take back what my suggestion to include it 😄

Finally, I updated the default log level to be fatal-only, since the warn level shows a few things that are probably irrelevant to end users. If someone wants to do more debugging, they can use TINI_VERBOSITY.

Cheers,

krallin and others added 2 commits November 4, 2016 13:22
- Don't mention options that don't exist in Usage.
- Don't include a log prefix when NO_ARGS is set.
- Turn up the default verbosity to FATAL when NO_ARGS is set.
- Expose verbosity via an ENV var for debugging.
This changes the execve exit status for the child process to be inline
with standard exit status codes for common execve failures.

I don't think this breaks any backwards compat with existing tini users
because it is still returning a non zero exit status but with correct
codes providing more information why it failed.
@krallin krallin mentioned this pull request Nov 4, 2016
@krallin
Copy link
Owner Author

krallin commented Nov 4, 2016

(Also added you to contributors, just let me know if you'd rather not of course)

@crosbymichael
Copy link
Contributor

Thanks, reviewing

@crosbymichael
Copy link
Contributor

LGTM

@krallin
Copy link
Owner Author

krallin commented Nov 4, 2016

Awesome. Did you want me to rename / mind me renaming the NO_ARGS option to something a bit clearer (e.g. DOCKERINIT)? You'd have to tweak it on your end as well if so.

@crosbymichael
Copy link
Contributor

@krallin whatever you want to call it. I think something generic is fine because we don't want to have a difference between the two versions. Its more about stripping out a couple features ( cli args, verbose logs ) than building it for docker.

I think something generic is cleaner.

@krallin
Copy link
Owner Author

krallin commented Nov 4, 2016

Sounds good; I renamed the arg to MINIMAL.

Cheers,

@krallin krallin changed the title "White label" when NO_ARGS is set "White label" when MINIMAL is set Nov 4, 2016
@crosbymichael
Copy link
Contributor

LGTM

@krallin krallin merged commit 4a92b9e into master Nov 4, 2016
@krallin
Copy link
Owner Author

krallin commented Nov 4, 2016

0.13 is live (with the tweaks we discussed and the new MINIMAL arg name)

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

Successfully merging this pull request may close these issues.

2 participants