-
Notifications
You must be signed in to change notification settings - Fork 315
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
Add experimental support for a statically built Supervisor, feature toggled in hab
#625
Conversation
By analyzing the blame information on this pull request, we identified @adamhjk to be a potential reviewer |
hab
hab
hab
hab
Note that if/when we merge this, then I'll push a |
☔ The latest upstream changes (presumably d0cdaa8) made this pull request unmergeable. Please resolve the merge conflicts. |
@fnichol this needs a rebase ;) |
Signed-off-by: Fletcher Nichol <[email protected]>
This change introduces a simple feature toggle which allows the `hab` binary to use a statically build version of the Supervisor rather than the current glibc dynamically linked version. As this is the first feature toggle that I know of in the codebase, we'll start really simple with an environment variable implementation and think carefully about scaling up to more :) To back the `hab start` and `hab sup` subcommands with the `core/hab-sup-static` pacakge rather than the default `core/hab-sup` package, set the `HAB_FEAT_SUP_STATIC` environment variable to a non-empty value. Otherwise our default behavior continues as normal, using the `core/hab-sup` package. For example: ``` > env RUST_LOG=info,hab::command::sup=debug,hab::exec=debug HAB_FEAT_SUP_STATIC=true hab start core/redis DEBUG:hab::command::sup: Enabling statically compiled Supervisor from core/hab-sup-static DEBUG:hab::exec: Calling execv: ("/hab/pkgs/core/hab-sup-static/0.6.0/20160602141707/bin/hab-sup") ["start", "core/redis"] hab-sup(MN): Starting core/redis hab-sup(GS): Supervisor 172.17.0.2: 13d12e83-de28-4ff9-8674-a64af032952b hab-sup(GS): Census redis.default: abf0c60c-1cae-40bc-b1a3-fc64d96a5193 hab-sup(GS): Starting inbound gossip listener -- snip -- ``` Signed-off-by: Fletcher Nichol <[email protected]>
d7c421b
to
2b95ce8
Compare
Let's take this - it's feature flagged off so we can roll it out whenever. |
📌 Commit 2b95ce8 has been approved by |
Signed-off-by: Fletcher Nichol <[email protected]> Pull request: #625 Approved by: juliandunn
This change introduces a simple feature toggle which allows the `hab` binary to use a statically build version of the Supervisor rather than the current glibc dynamically linked version. As this is the first feature toggle that I know of in the codebase, we'll start really simple with an environment variable implementation and think carefully about scaling up to more :) To back the `hab start` and `hab sup` subcommands with the `core/hab-sup-static` pacakge rather than the default `core/hab-sup` package, set the `HAB_FEAT_SUP_STATIC` environment variable to a non-empty value. Otherwise our default behavior continues as normal, using the `core/hab-sup` package. For example: ``` > env RUST_LOG=info,hab::command::sup=debug,hab::exec=debug HAB_FEAT_SUP_STATIC=true hab start core/redis DEBUG:hab::command::sup: Enabling statically compiled Supervisor from core/hab-sup-static DEBUG:hab::exec: Calling execv: ("/hab/pkgs/core/hab-sup-static/0.6.0/20160602141707/bin/hab-sup") ["start", "core/redis"] hab-sup(MN): Starting core/redis hab-sup(GS): Supervisor 172.17.0.2: 13d12e83-de28-4ff9-8674-a64af032952b hab-sup(GS): Census redis.default: abf0c60c-1cae-40bc-b1a3-fc64d96a5193 hab-sup(GS): Starting inbound gossip listener -- snip -- ``` Signed-off-by: Fletcher Nichol <[email protected]> Pull request: #625 Approved by: juliandunn
☀️ Test successful - travis |
Signed-off-by: Fletcher Nichol <[email protected]> Pull request: #625 Approved by: juliandunn
This change introduces a simple feature toggle which allows the `hab` binary to use a statically build version of the Supervisor rather than the current glibc dynamically linked version. As this is the first feature toggle that I know of in the codebase, we'll start really simple with an environment variable implementation and think carefully about scaling up to more :) To back the `hab start` and `hab sup` subcommands with the `core/hab-sup-static` pacakge rather than the default `core/hab-sup` package, set the `HAB_FEAT_SUP_STATIC` environment variable to a non-empty value. Otherwise our default behavior continues as normal, using the `core/hab-sup` package. For example: ``` > env RUST_LOG=info,hab::command::sup=debug,hab::exec=debug HAB_FEAT_SUP_STATIC=true hab start core/redis DEBUG:hab::command::sup: Enabling statically compiled Supervisor from core/hab-sup-static DEBUG:hab::exec: Calling execv: ("/hab/pkgs/core/hab-sup-static/0.6.0/20160602141707/bin/hab-sup") ["start", "core/redis"] hab-sup(MN): Starting core/redis hab-sup(GS): Supervisor 172.17.0.2: 13d12e83-de28-4ff9-8674-a64af032952b hab-sup(GS): Census redis.default: abf0c60c-1cae-40bc-b1a3-fc64d96a5193 hab-sup(GS): Starting inbound gossip listener -- snip -- ``` Signed-off-by: Fletcher Nichol <[email protected]> Pull request: #625 Approved by: juliandunn
This change set adds a statically build
hab-sup
Plan which produces acore/hab-sup-static
package. The defaults of using a glibc-based dynamically linked binary remain unchanged. This will allow us to begin a vetting of a static Supervisor approach without committing all users to the experiment.[hab] Add a simple feature toggle to use a static Supervisor.
This change introduces a simple feature toggle which allows the
hab
binary to use a statically build version of the Supervisor rather than the current glibc dynamically linked version.As this is the first feature toggle that I know of in the codebase, we'll start really simple with an environment variable implementation and think carefully about scaling up to more :)
To back the
hab start
andhab sup
subcommands with thecore/hab-sup-static
pacakge rather than the defaultcore/hab-sup
package, set theHAB_FEAT_SUP_STATIC
environment variable to a non-empty value. Otherwise our default behavior continues as normal, using thecore/hab-sup
package.For example: