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

host-containers: default "enabled" and "superpowered" to false #1580

Merged

Conversation

etungsten
Copy link
Contributor

Issue number:
Partially addresses #1385

Description of changes:

Author: Erikson Tung <etung@amazon.com>
Date:   Mon May 17 16:37:52 2021 -0700

    host-containers: default "enabled" and "superpowered" to false
    
    Defaults "enabled" and "superpowered" to false when not defined.

Testing done:
Launched instance with the following userdata.
self-terminator doesn't have either enabled or superpowered specified

[settings.host-containers.admin]
enabled = true

[settings.host-containers.control]
enabled = true

[settings.host-containers.self-terminator]
source="snip.dkr.ecr.us-west-2.amazonaws.com/self-terminator:latest"

The host was able to come up fine and the settings are as expected:

   "host-containers":{
      ...,
      "self-terminator":{
         "source":"snip.dkr.ecr.us-west-2.amazonaws.com/self-terminator:latest"
      }
   },

Then checking the host-container's environment variables, both enabled and superpowered are defaulted to false.

bash-5.0# cat /etc/host-containers/self-terminator.env 
CTR_SUPERPOWERED=false
CTR_SOURCE=snip.dkr.ecr.us-west-2.amazonaws.com/self-terminator:latest

# Just for reference; service is enabled or disabled by host-containers service
# CTR_ENABLED=false

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.

Defaults "enabled" and "superpowered" to false when not defined.
@tjkirch tjkirch self-requested a review May 18, 2021 16:00
@etungsten etungsten merged commit 270600b into bottlerocket-os:develop May 19, 2021
@etungsten etungsten deleted the sensible-host-container-defaults branch May 19, 2021 19:12
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