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

CRI: upgrade protobuf to v3 #39158

Merged
merged 8 commits into from
Jan 20, 2017
Merged

Conversation

feiskyer
Copy link
Member

@feiskyer feiskyer commented Dec 22, 2016

For #38854, this PR upgrades CRI protobuf version to v3, and also updated related packages for confirming to new api.

Release note:

CRI: upgrade protobuf version to v3.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 22, 2016
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. release-note-label-needed labels Dec 22, 2016
@k8s-ci-robot
Copy link
Contributor

Jenkins verification failed for commit 0f4ff82694731321a618e11175a17aa6d9880f05. Full PR test history.

The magic incantation to run this job again is @k8s-bot verify test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-ci-robot
Copy link
Contributor

Jenkins GKE smoke e2e failed for commit 0f4ff82694731321a618e11175a17aa6d9880f05. Full PR test history.

The magic incantation to run this job again is @k8s-bot cvm gke e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@feiskyer
Copy link
Member Author

@k8s-bot cri e2e test this

@feiskyer feiskyer changed the title WIP: upgrade CRI to protobuf v3 CRI: upgrade protobuf to v3 Dec 26, 2016
@k8s-github-robot k8s-github-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed release-note-label-needed labels Dec 29, 2016
@k8s-ci-robot
Copy link
Contributor

Jenkins Bazel Build failed for commit bd1aec921ca840154b5ba65c1e12f96fb9c1cc8a. Full PR test history.

The magic incantation to run this job again is @k8s-bot bazel test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@feiskyer
Copy link
Member Author

cc @yujuhong @yifan-gu @euank

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 29, 2016
@feiskyer
Copy link
Member Author

@k8s-bot bazel test this

@feiskyer
Copy link
Member Author

All tests passed. cc/ @kubernetes/sig-node-misc

@resouer resouer requested review from vishh and yujuhong December 29, 2016 07:46
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 31, 2016
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 4, 2017
@k8s-ci-robot
Copy link
Contributor

Jenkins CRI GCE Node e2e failed for commit bfa4baec254be7ba0442fa85453a4fc2f68b26b1. Full PR test history.

The magic incantation to run this job again is @k8s-bot cri node e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@yujuhong yujuhong assigned yujuhong and unassigned vishh Jan 5, 2017
@yujuhong yujuhong removed the request for review from vishh January 5, 2017 00:31
@yifan-gu
Copy link
Contributor

yifan-gu commented Jan 18, 2017

LGTM overall,

I have questions about some of the integer-type fields and their default value being 0. Will review the rest once these are addressed.

The default 0 values are passed to runtime by GetXXX() today already, e.g. GetTimeout(), so there is no functional changes happening here.

But we should better document all those integer default values in the proto. See checklist here

@yujuhong
Copy link
Contributor

yujuhong commented Jan 18, 2017

The default 0 values are passed to runtime by GetXXX() today already, e.g. GetTimeout(), so there is no functional changes happening here.

Better document is needed for sure, especially now that there is no way to check the existence of these field even if we want to. The use of timeout is not very consistent -- in one case (StopContainer) it's used to indicate immediate termination, while in the other (ExecSync request) it means run forever. What 0 means for the resource quota/limit fields is just unclear.

As for run_as_user and uid, we do check them in the code, and I don't think we can not wrap them in proto3.

@Random-Liu
Copy link
Member

Random-Liu commented Jan 19, 2017

t's not from the PR, but can we also rename the status to ready ? status doesn't sound like a boolean

@yifan-gu
I name it as status just to match the K8s api https://github.com/kubernetes/kubernetes/blob/master/pkg/api/types.go#L1371-L1381.

"ready" or not should be in condition type (RuntimeReady, NetworkNotReady), status should only indicate whether the condition is true or not.

@feiskyer
Copy link
Member Author

@yujuhong @yifan-gu Addressing comments. PTAL.

@yujuhong
Copy link
Contributor

Reviewed 17 of 41 files at r1, 15 of 20 files at r2, 11 of 11 files at r3.
Review status: all files reviewed at latest revision, 10 unresolved discussions.


hack/verify-flags/exceptions.txt, line 70 at r3 (raw file):

cluster/saltbase/salt/opencontrail-networking-master/init.sls:      - 'SERVICE_CLUSTER_IP_RANGE': '{{ pillar.get('service_cluster_ip_range') }}'
cluster/saltbase/salt/opencontrail-networking-minion/init.sls:      - 'SERVICE_CLUSTER_IP_RANGE': '{{ pillar.get('service_cluster_ip_range') }}'
cluster/saltbase/salt/supervisor/kubelet-checker.sh:	{% set kubelet_port = pillar['kubelet_port'] -%}

Why would the PR touch this?...


pkg/kubelet/api/v1alpha1/runtime/api.proto, line 647 at r3 (raw file):

    string container_id = 1;
    // Timeout in seconds to stop the container. Must be > 0.
    int64 timeout = 2;

I think we should allow timeout=0. How about:
Timeout in seconds to wait for the container to stop before forcibly terminating it. Default: 0 (forcibly terminate the container immediately)


pkg/kubelet/api/v1alpha1/runtime/api.proto, line 823 at r3 (raw file):

    // ID of the container to which to forward the port.
    string pod_sandbox_id = 1;
    // Port to forward. Each port must be > 0 if provided.

nit: I think repeated fields should be ok because they'll get converted to a list (which could be nil).


Comments from Reviewable

@yujuhong
Copy link
Contributor

Looks good overall with some nits.
Probably also want to squash some of the commits.

@@ -699,7 +705,7 @@ message Container {
string image_ref = 5;
// State of the container.
ContainerState state = 6;
// Creation time of the container in nanoseconds.
// Creation time of the container in nanoseconds. Must be > 0.
Copy link
Contributor

Choose a reason for hiding this comment

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

while the container is not created, this can be 0 right?

@@ -728,13 +734,13 @@ message ContainerStatus {
ContainerMetadata metadata = 2;
// Status of the container.
ContainerState state = 3;
// Creation time of the container in nanoseconds.
// Creation time of the container in nanoseconds. Must be > 0.
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@yifan-gu
Copy link
Contributor

@Random-Liu Thanks for the clarification.

@feiskyer LGTM except the comments made by @yujuhong

@feiskyer
Copy link
Member Author

Rebased and squashed commits.

Why would the PR touch this?

hack/verify-flags/exceptions.txt is generated automatically by hack/verify-flags-underscore.py -e.

@yujuhong
Copy link
Contributor

/lgtm

Please help watch the cri builds to see if anything breaks after the PR is merged.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 20, 2017
@feiskyer
Copy link
Member Author

Please help watch the cri builds to see if anything breaks after the PR is merged.

Of course. Is CRI enabled for all tests in page google-cri ?

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 40168, 40165, 39158, 39966, 40190)

@k8s-github-robot k8s-github-robot merged commit 0e1a166 into kubernetes:master Jan 20, 2017
@Random-Liu
Copy link
Member

Of course. Is CRI enabled for all tests in page google-cri ?

Yeah.

@yujuhong
Copy link
Contributor

FYI, I glanced over all the cri builds and didn't see any obvious red builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants