kubernetes-sigs / cri-tools

CLI and validation tools for Kubelet Container Runtime Interface (CRI) .
Apache License 2.0
1.63k stars 445 forks source link

Fixes invalid JSON in crictl info #1486

Closed saschagrunert closed 1 month ago

saschagrunert commented 2 months ago

What type of PR is this?

/kind bug

What this PR does / why we need it:

containerd on Windows may not escape the return message which may result in invalid JSON in crictl info.

Message from containerd: cni config load failed: no network config found in C:\Program Files \containerd\cni\conf: cni plugin

not initialized: failed to load cni config

Cherry-picked: 88df400df7b1b65dbd9d6fbab447a6b6da5177ad

Which issue(s) this PR fixes:

Fixes https://github.com/kubernetes-sigs/cri-tools/issues/1426

Special notes for your reviewer:

Taking over the reverts of https://github.com/kubernetes-sigs/cri-tools/pull/1429 and https://github.com/kubernetes-sigs/cri-tools/pull/1446 to finally fix that issue.

Does this PR introduce a user-facing change?

Fixed invalid JSON in crictl info on Windows.
kwilczynski commented 2 months ago

Thank you for fixing this! Much appreciated!

kwilczynski commented 2 months ago

/approve /lgtm

k8s-ci-robot commented 2 months ago

@kwilczynski: changing LGTM is restricted to collaborators

In response to [this](https://github.com/kubernetes-sigs/cri-tools/pull/1486#issuecomment-2212944564): >/approve >/lgtm Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
saschagrunert commented 1 month ago

@kubernetes-sigs/cri-tools-maintainers PTAL

kwilczynski commented 1 month ago

Still looks good!

/approve /lgtm

k8s-ci-robot commented 1 month ago

@kwilczynski: changing LGTM is restricted to collaborators

In response to [this](https://github.com/kubernetes-sigs/cri-tools/pull/1486#issuecomment-2219817254): >Still looks good! > >/approve >/lgtm Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
saschagrunert commented 1 month ago

@kubernetes-sigs/cri-tools-maintainers PTAL

kwilczynski commented 1 month ago

/approve /lgtm

k8s-ci-robot commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kwilczynski, saschagrunert

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/cri-tools/blob/master/OWNERS)~~ [saschagrunert] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment