Skip to content

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

Merged
mxpv merged 3 commits intocontainerd:release/1.7from
dcantah:backport-cri-stats-changes
May 31, 2023
Merged

[release/1.7] Backport CRI sandbox server stats changes#8604
mxpv merged 3 commits intocontainerd:release/1.7from
dcantah:backport-cri-stats-changes

Conversation

@dcantah
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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..

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

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants