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

[release/1.7] Backport CRI sandbox server stats changes #8604

Merged
merged 3 commits into from
May 31, 2023

Conversation

dcantah
Copy link
Member

@dcantah dcantah commented May 30, 2023

mxpv and others added 3 commits May 30, 2023 14:52
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
(cherry picked from commit 464a497)
Signed-off-by: Danny Canter <danny@dcantah.dev>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
(cherry picked from commit 79cb4b0)
Signed-off-by: Danny Canter <danny@dcantah.dev>
To further some ongoing work in containerd to make as much code as possible
able to be used on any platform (to handle runtimes that can virtualize/emulate
a variety of different OSes), this change makes stats able to be handled on
any of the supported stat types (just linux and windows). To accomplish this,
we use the platform the sandbox returns from its `Platform` rpc to decide
what format the containers in a given sandbox are returning metrics in, then
we can typecast/marshal accordingly.

Signed-off-by: Danny Canter <danny@dcantah.dev>
(cherry picked from commit 7274e33)
@dcantah dcantah added the area/cri Container Runtime Interface (CRI) label May 30, 2023
@dmcgowan
Copy link
Member

Related?

failed to list container stats for containers status: rpc error: code = NotFound desc = failed to convert to cri containerd stats format: failed to get metrics handler for container "c30bcaba3feea00b5d25d3115b2bb70bea28c92df2a5c3a87c18d3226a7ab1bd": failed to find sandbox id "25c794fc62cb7551a6c5034bf0fa523b4ff64d1075e43467111ba33416850d9f": not found
  Unexpected error:
      <*status.Error | 0xc00052e620>: {
          s: {
              s: {
                  state: {
                      NoUnkeyedLiterals: {},
                      DoNotCompare: [],
                      DoNotCopy: [],
                      atomicMessageInfo: nil,
                  },
                  sizeCache: 0,
                  unknownFields: nil,
                  Code: 5,
                  Message: "failed to convert to cri containerd stats format: failed to get metrics handler for container \"c30bcaba3feea00b5d25d3115b2bb70bea28c92df2a5c3a87c18d3226a7ab1bd\": failed to find sandbox id \"25c794fc62cb7551a6c5034bf0fa523b4ff64d1075e43467111ba33[416](https://github.com/containerd/containerd/actions/runs/5126622303/jobs/9221446833#step:19:417)850d9f\": not found",
                  Details: nil,
              },
          },
      }
      rpc error: code = NotFound desc = failed to convert to cri containerd stats format: failed to get metrics handler for container "c30bcaba3feea00b5d25d3115b2bb70bea28c92df2a5c3a87c18d3226a7ab1bd": failed to find sandbox id "25c794fc62cb7551a6c5034bf0fa523b4ff64d1075e43467111ba33416850d9f": not found
  occurred
  In [It] at: github.com/kubernetes-sigs/cri-tools/pkg/validate/container.go:669

@dcantah
Copy link
Member Author

dcantah commented May 30, 2023

Related?

Yea, this wouldn't fail without these changes, but it's basically saying that the pod for this containers been deleted/removed already, so maybe these changes have unearthed a bug that was dormant..

@mxpv mxpv merged commit 4f2af34 into containerd:release/1.7 May 31, 2023
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cri Container Runtime Interface (CRI)
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants