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

Allow configuring docker storage driver in GCE #55512

Merged
merged 1 commit into from
Nov 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions cluster/gce/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ if [[ -n "${DISABLE_DOCKER_LIVE_RESTORE:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} DISABLE_DOCKER_LIVE_RESTORE"
fi

# Override default docker storage driver.
if [[ -n "${DOCKER_STORAGE_DRIVER:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} DOCKER_STORAGE_DRIVER"
fi

# Override default GLBC image
if [[ -n "${GCE_GLBC_IMAGE:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} GCE_GLBC_IMAGE"
Expand Down
5 changes: 5 additions & 0 deletions cluster/gce/config-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,11 @@ if [[ -n "${DISABLE_DOCKER_LIVE_RESTORE:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} DISABLE_DOCKER_LIVE_RESTORE"
fi

# Override default docker storage driver.
if [[ -n "${DOCKER_STORAGE_DRIVER:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} DOCKER_STORAGE_DRIVER"
fi

# Override default GLBC image
if [[ -n "${GCE_GLBC_IMAGE:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} GCE_GLBC_IMAGE"
Expand Down
6 changes: 6 additions & 0 deletions cluster/gce/gci/configure-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,12 @@ function assemble-docker-flags {
docker_opts+=" --live-restore=false"
fi

# Override docker storage driver if the environment variable is set

if [[ -n "${DOCKER_STORAGE_DRIVER:-}" ]]; then
docker_opts+=" --storage-driver=${DOCKER_STORAGE_DRIVER}"
Copy link
Member

Choose a reason for hiding this comment

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

By the time we reconfigure we have write the docker options we have already loaded the docker images for some of the kube-components:

https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/gci/master.yaml#L31

Changing the storage driver requires reloading of the images. Without reloading, those kube-apiserver etc... will crashloop on image pull failures.

This change breaks GKE (although it's not the only thing currently breaking GKE). I'd like to revert it in #55624 so we can start getting signal in GKE again. cc @abgworrall

Copy link
Member

Choose a reason for hiding this comment

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

Ok, we decided to revert this pr.

fi

echo "DOCKER_OPTS=\"${docker_opts} ${EXTRA_DOCKER_OPTS:-}\"" > /etc/default/docker

if [[ "${use_net_plugin}" == "true" ]]; then
Expand Down