Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fidencio
Copy link
Contributor

@fidencio fidencio commented Sep 4, 2020

What type of PR is this?

/kind bug

What this PR does / why we need it:

The continerd/ttrpc package, used to support the runtimes of type "vm",
relies on the gogo/protobuf protocol buffer implementation.
Recently, google updated the golang protocol buffer implementation with
a newer and backward incompatible API:
https://blog.golang.org/protobuf-apiv2

The gogo/protobuf protocol has not been updated and is now incompatible
with the newer golang protocol buffer implementation.
Unfortunately, the containerd/ttrpc package imports also the package:
google.golang.org/genproto/googleapis/rpc/status
which is generated by means of the golang protocol buffer. With the
newer version, the generated code is no more compatible with
gogo/protobuf, leading to panic during execution of the ttrpc code.

While the ttrpc package needs a proper fix, this patch downgrades the
version of the golang/protobuf, genproto, and grpc.

Which issue(s) this PR fixes:

Fixes #3991

Special notes for your reviewer:

@fgiudici, @mrunalp, @haircommander,

Seems that this patch is the simplest we can go for the #3991 issue.
This is basically ...

diff --git a/go.mod b/go.mod
index 1bf2bf89b..dec1949ac 100644
--- a/go.mod
+++ b/go.mod
@@ -70,6 +70,9 @@ require (
 replace (
        github.com/opencontainers/runc => github.com/opencontainers/runc v1.0.0-rc90
        github.com/opencontainers/runtime-spec => github.com/opencontainers/runtime-spec v1.0.3-0.20200710190001-3e4195d92445
+       github.com/golang/protobuf => github.com/golang/protobuf v1.3.5
+       google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24
+       google.golang.org/grpc => google.golang.org/grpc v1.26.0
        k8s.io/api => k8s.io/kubernetes/staging/src/k8s.io/api v0.0.0-20200826142205-e19964183377
        k8s.io/apiextensions-apiserver => k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20200826142205-e1996418337
        k8s.io/apimachinery => k8s.io/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20200826142205-e19964183377

... followed by a make vendor.

This came up from a suggestion for stopping vendoring k8s.io/kubernetes, which I implemented in a separate branch, and then just downgrading the needed bits. After doing that, I've decided to only downgrade the needed bits without having to copy k8s.io/kubernetes into CRI-O and it just works as expected.

Let's see if CI is happy about it.

Ah, I've added Francesco's and Mrunal's Signed-off-by, after talking to them and, mainly, after having this patch based on their work and / or suggestions.

Does this PR introduce a user-facing change?

None

The continerd/ttrpc package, used to support the runtimes of type "vm",
relies on the gogo/protobuf protocol buffer implementation.
Recently, google updated the golang protocol buffer implementation with
a newer and backward incompatible API:
https://blog.golang.org/protobuf-apiv2

The gogo/protobuf protocol has not been updated and is now incompatible
with the newer golang protocol buffer implementation.
Unfortunately, the containerd/ttrpc package imports also the package:
google.golang.org/genproto/googleapis/rpc/status
which is generated by means of the golang protocol buffer. With the
newer version, the generated code is no more compatible with
gogo/protobuf, leading to panic during execution of the ttrpc code.

While the ttrpc package needs a proper fix, this patch downgrades the
version of the golang/protobuf, genproto, and grpc.

Signed-off-by: Fabiano Fidêncio <[email protected]>
Signed-off-by: Francesco Giudici <[email protected]>
Signed-off-by: Mrunal Patel <[email protected]>
@openshift-ci-robot openshift-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. labels Sep 4, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2020
@fidencio
Copy link
Contributor Author

fidencio commented Sep 4, 2020

/cc @fgiudici

@openshift-ci-robot
Copy link

@fidencio: GitHub didn't allow me to request PR reviews from the following users: fgiudici.

Note that only cri-o members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @fgiudici

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@fgiudici
Copy link
Contributor

fgiudici commented Sep 4, 2020

Tested the branch, I can confirm it solves #3991

@codecov
Copy link

codecov bot commented Sep 4, 2020

Codecov Report

Merging #4164 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4164   +/-   ##
=======================================
  Coverage   40.85%   40.85%           
=======================================
  Files         111      111           
  Lines        9501     9501           
=======================================
  Hits         3882     3882           
  Misses       5242     5242           
  Partials      377      377           

@openshift-ci-robot
Copy link

@fidencio: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws 6bda9b5 link /test e2e-aws
ci/openshift-jenkins/e2e_crun_cgroupv2 6bda9b5 link /test e2e_cgroupv2

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. 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.

@mrunalp
Copy link
Member

mrunalp commented Sep 4, 2020

This looks fine to me for now. Next, we should analyze and reduce our deps to just cri-api + utils from k8s.io.

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fidencio, mrunalp

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mrunalp
Copy link
Member

mrunalp commented Sep 4, 2020

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runtime_vm: Panic creating a container due to "panic: protobuf tag not enough fields in Status.state"

5 participants