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 enable-docker-bridge bootstrap argument #187

Merged
merged 1 commit into from
Feb 15, 2019

Conversation

micahhausler
Copy link
Member

Issue #, if available:

Fixes #183

Description of changes:

  • Updated changelog git command
  • Added enable-docker-bridge bootstrap argument

The default will be to leave the bridge network disabled, but users can now add --enable-docker-bridge true as a bootstrap argument in order to preserve the old behavior.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -142,6 +149,12 @@ Environment='KUBELET_EXTRA_ARGS=$KUBELET_EXTRA_ARGS'
EOF
fi

if [[ "$ENABLE_DOCKER_BRIDGE" = "true" ]]; then
# Enabling live-restore prevents docker from recreating the default bridge network
jq '.bridge="docker0" | ."live-restore"=false' /etc/docker/daemon.json | tee /etc/docker/daemon.json

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you reword the comment to agree with the state we are setting here? E.g. "Disabling..."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

* Updated changelog git command
@micahhausler micahhausler merged commit 0db49b4 into awslabs:master Feb 15, 2019
@micahhausler micahhausler deleted the enable-bridge-option branch February 15, 2019 18:06
@@ -51,6 +52,11 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
--enable-docker-bridge)
ENABLE_DOCKER_BIDGE=$2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo here, I just spent an hour debugging this! Can you please release a hotfix for this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is a bit unfortunate.

if [[ "$ENABLE_DOCKER_BRIDGE" = "true" ]]; then
# Enabling the docker bridge network. We have to disable live-restore as it
# prevents docker from recreating the default bridge network on restart
jq '.bridge="docker0" | ."live-restore"=false' /etc/docker/daemon.json | tee /etc/docker/daemon.json
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing --enable-docker-bridge true appears to override /etc/docker/daemon.json leaving it empty 🤔. I believe tee can cause unexpected results when used in combination with jq.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that as well, this should be fixed in addition to the typo

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.

5 participants