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

GCI: add support for network plugin #27027

Merged
merged 1 commit into from
Jun 9, 2016
Merged

GCI: add support for network plugin #27027

merged 1 commit into from
Jun 9, 2016

Conversation

andyzheng0831
Copy link

I had run e2e against a cluster with both master and nodes on GCI a couple of times. The PR auto tests will cover the hybrid cluster with just master on GCI.

cc/ @roberthbailey @fabioy @kubernetes/goog-image

@andyzheng0831 andyzheng0831 added release-note Denotes a PR that will be considered when it comes time to generate release notes. area/os/gci labels Jun 8, 2016
@andyzheng0831 andyzheng0831 added this to the v1.3 milestone Jun 8, 2016
@@ -146,6 +146,17 @@ function install-kube-binary-config {
else
rm -f "${kube_bin}/kubelet"
fi
if [[ "${NETWORK_PROVIDER:-}" == "kubenet" ]] || \
[[ "${NETWORK_PROVIDER:-}" == "cni" ]]; then
#TODO(andyzheng0831): We should make the cni version number as a k8s env variable.
Copy link
Author

Choose a reason for hiding this comment

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

@freehan I think we should find a way to simplify the code maintenance when bumping the cni version. One option is put the version number in a kube env variable, which will be passed to the network plugin manifest and here. So you will need to just update one place whenever you need to bump the version. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

If cni is specified then the cni version should be another kube-env field.

Copy link
Author

Choose a reason for hiding this comment

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

I am not familiar with the cni manifest change, so I leave a TODO here, and will coordinate with the cni owner freehan@ to make the change, which will be in a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, we always want to use the latest stable cni version in kubenet. If customer want to specify their own, they can use cni network plugin and bring their own config/binary.

@k8s-github-robot k8s-github-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 8, 2016
@@ -261,6 +268,12 @@ function assemble-docker-flags {
fi

echo "DOCKER_OPTS=\"${docker_opts} ${EXTRA_DOCKER_OPTS:-}\"" > /etc/default/docker
# If using a network plugin, we need to explicitly restart docker daemon, because
# kubelet will not do it.
if [[ "${use_net_plugin=}" == "true" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be "${use_net_plugin:-}"?

Copy link
Author

Choose a reason for hiding this comment

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

Nice catch, thanks! Will correct it.

@andyzheng0831
Copy link
Author

@roberthbailey @fabioy the network plugin was added since 1.2 branch but I notice currently GKE does not use the network plugin. I am not sure what is GKE's plan about this network plugin feature. If not necessary, we may avoid making a trusty change for it and cherrypick in 1.2-release branch.

@@ -329,6 +343,7 @@ function start-kubelet {
flags+=" --register-schedulable=false"
flags+=" --reconcile-cidr=false"
flags+=" --pod-cidr=10.123.45.0/30"
reconcile_cidr=false
Copy link
Contributor

Choose a reason for hiding this comment

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

flags += " --reconcile-cidr=false"

Copy link
Author

Choose a reason for hiding this comment

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

Ah I made a mistake that I thought the default value is false. Just check it, this flag is true by default. I will update the code

@andyzheng0831
Copy link
Author

@freehan the PR is updated, please review it. Thanks!

@@ -329,6 +343,7 @@ function start-kubelet {
flags+=" --register-schedulable=false"
flags+=" --reconcile-cidr=false"
Copy link
Contributor

Choose a reason for hiding this comment

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

you may end up with duplicate flag here

Copy link
Author

Choose a reason for hiding this comment

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

This should be deleted. Will update it shortly

@andyzheng0831
Copy link
Author

@k8s-bot unit test this issue #26815

@freehan
Copy link
Contributor

freehan commented Jun 8, 2016

LGTM pending on tests

@andyzheng0831
Copy link
Author

@k8s-bot test this issue #IGNORE

@k8s-bot
Copy link

k8s-bot commented Jun 8, 2016

GCE e2e build/test passed for commit 66d6b43.

@freehan freehan added lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Jun 8, 2016
@freehan
Copy link
Contributor

freehan commented Jun 9, 2016

bump priority. This PR is required to integrate GCI with kubenet

@freehan freehan removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 9, 2016
@freehan
Copy link
Contributor

freehan commented Jun 9, 2016

just to be safe. Can we NOT run kubenet on master? Since we are very close to release cut.

@freehan
Copy link
Contributor

freehan commented Jun 9, 2016

Nevermind. just check the code once again. It should be ok.

@freehan freehan added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 9, 2016
@andyzheng0831
Copy link
Author

@freehan FYI, if you think network plugin is not ready to deploy, please set the NETWORK_PROVIDER to false. For GCI, our target is to provide feature parity as ContainerVM, and this is the reason why I made this PR to add the network plugin in GCI config. As for GKE rollout, this pr should be OK because currently GKE does not use kubenet.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Jun 9, 2016

GCE e2e build/test passed for commit 66d6b43.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 72beb65 into kubernetes:master Jun 9, 2016
@andyzheng0831 andyzheng0831 deleted the gci-network branch June 9, 2016 16:42
@roberthbailey
Copy link
Contributor

@matchstick -- what is the plan with network plugins for 1.3?

@freehan
Copy link
Contributor

freehan commented Jun 9, 2016

@roberthbailey kubenet is on by default now.

k8s-github-robot pushed a commit that referenced this pull request Jun 17, 2016
Automatic merge from submit-queue

Revert "Revert "GCI: add support for network plugin""

PR #27027 added the network plugin support in GCI config, but later a bug in the network plugin broke e2e tests (see issue #27118). The bug was fixed by #27141 and we have been repeatedly run the serial e2e tests more than 10 times to verify the fix. Now it should be safe to put the GCI network plugin support back.

We will first merge in the master branch and monitor the Jenkins serial tests for a while and then cherry-pick it into release-1.3 branch.
@@ -341,6 +355,15 @@ function start-kubelet {
flags+=" --hairpin-mode=${HAIRPIN_MODE}"
fi
fi
# Network plugin
if [[ -n "${NETWORK_PROVIDER:-}" ]]; then
flags+=" --network-plugin-dir=/home/kubernetes/bin"
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that for CNI this parameter sets the directory where config is searched, not binaries. As far as I can tell CNI just doesn't work on GCI now.

Copy link
Contributor

Choose a reason for hiding this comment

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

True. Will fix it along with: #28563

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh; I actually started on a PR as this is a total blocker for me.

Copy link
Contributor

Choose a reason for hiding this comment

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

Go ahead then. I have not started. Please also refer to the discussions in #28563.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants