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

Add 'enter-admin-container' to easily enable and enter admin container #18

Merged
merged 3 commits into from
Nov 11, 2021

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented Nov 10, 2021

Description of changes:

d54e5ec enable-admin-container: use 'apiclient set'
17d4a7a enable-admin-container: only set if not already
    Changing the setting restarts services, which is unnecessary if it's
    already enabled, and restarting services disconnects existing users of
    the admin container.
f5de0a2 Add 'enter-admin-container' to easily enable and enter admin container

This is based on the new apiclient exec from bottlerocket-os/bottlerocket#1802, which allows people to enter the admin container without SSH; this PR makes that easier to use from the control container.

Testing done:

Tested the enable-admin-container changes first:

  • If it's not already enabled, it does so.
  • If it's already enabled, it doesn't! No more disconnections!

Then enter-admin-container:

  • If it's not already enabled, it uses enable-admin-container correctly, then enters.
  • If it's already enabled, it enters quickly.

Also confirmed that it dies and messages as expected if it takes too long for the admin container to start, along with a bunch of improbable error cases found before the code was clean.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Changing the setting restarts services, which is unnecessary if it's
already enabled, and restarting services disconnects existing users of
the admin container.
@tjkirch tjkirch merged commit fadb844 into bottlerocket-os:develop Nov 11, 2021
@tjkirch tjkirch deleted the enter-admin-container branch November 11, 2021 19:25
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.

4 participants