-
Notifications
You must be signed in to change notification settings - Fork 137
Transition to flag based configuration #257
Comments
We'll follow the deprecation cycle mechanism of Mesos itself. Let's not forget to notify the community and users, notably the Mesosphere DCOS team. |
This pretty much summarizes my choice of flags: http://peter.bourgon.org/go-in-production/#configuration |
I'm ok with flags as long as the docker image comes with a wrapper script to translate env vars to flags. |
quoting @spacejam's Dockerfile for etcd:
One can do pretty advanced logic with some bash magic there. |
Sure, but having to run a shell has some serious drawbacks, namely signal handling, verbosity, and having to include a shell in the image in the first place. For the record, the images currently produced by mesos-dns-pkg have no shell in them. It's just the statically compiled binary and some /etc files. |
Even the busybox containers have a shell. If signals are an issue, will `sh -c 'exec ....'`` help? |
I'm not saying we can't put a shell in the image. I'm just saying that the current packaging doesn't. I'm pretty sure the reason it doesn't is to minimize image size, but it also make debugging harder, because you can't As for exec... that should work to propagate signals to a single command. Tho if you need to do multiple commands for setup beforehand, you wont be able to handle signals before the exec without a trap & wait. |
@koziraki was a pretty staunch advocate of the current file-based config. he had concerns about the "command runner" (who executes mesos-dns) having to know the configuration details of mesos-dns at the time the binary was executed, vs just pointing mesos-dns at a location that someone else deals with (the config file). That said, I'm generally not a fan of having tons of flags for a binary, but I understand the arguments for flags and/or envvar in the context of containerization. I'd actually lean towards envvar to either override, or provide fallback values for, values set in an optional config file (and don't implement the flags approach)-- that keeps about the same distance between configuration and the execution of the binary (at least, more distance than flags) and also allows for easier containerization. |
Personally, I like how mesos handles flags. I think it's great to have the flexibility to use flags if you want (great discoverability), or use a mix of env-vars and flags (useful in docker-compose, because env-vars can be populated by host env-vars, and cmd args can be shell evaluated after the IP is known), or make a "config file" of env-vars you can manage externally and source easily (useful with upstart). |
Is this issue just waiting on a PR? I'd be glad to make one, but would like to know if someone is working on this first. |
I think the strategy that we tentatively agreed to was flags that default On Wed, May 4, 2016 at 11:20 AM, Micah Hausler [email protected]
|
Replaces #97
The text was updated successfully, but these errors were encountered: