Skip to content

introspection: regenerate UUID if state is empty#10503

Merged
kzys merged 1 commit intocontainerd:mainfrom
samuelkarp:issue-10491
Jul 25, 2024
Merged

introspection: regenerate UUID if state is empty#10503
kzys merged 1 commit intocontainerd:mainfrom
samuelkarp:issue-10491

Conversation

@samuelkarp
Copy link
Member

The /var/lib/containerd/io.containerd.grpc.v1.introspection/uuid file stores a UUID to identify the particular containerd daemon responding to requests. The file should either exist with a UUID, or not exist. However, it has been observed that the file can be truncated with 0 bytes, which will then fail to be parsed as a valid UUID.

As a defensive practice, detect a 0-length file and overwrite with a new UUID rather than failing.

Fixes: #10491

@AkihiroSuda
Copy link
Member

However, it has been observed that the file can be truncated with 0 bytes, which will then fail to be parsed as a valid UUID.

How this happens?

@AkihiroSuda AkihiroSuda added cherry-pick/1.6.x cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch labels Jul 25, 2024
@samuelkarp
Copy link
Member Author

How this happens?

Unclear, but that's the report in #10491.

The /var/lib/containerd/io.containerd.grpc.v1.introspection/uuid file
stores a UUID to identify the particular containerd daemon responding to
requests.  The file should either exist with a UUID, or not exist.
However, it has been observed that the file can be truncated with 0
bytes, which will then fail to be parsed as a valid UUID.

As a defensive practice, detect a 0-length file and overwrite with a new
UUID rather than failing.

Fixes: containerd#10491
Signed-off-by: Samuel Karp <[email protected]>
@kzys kzys added this pull request to the merge queue Jul 25, 2024
@samuelkarp
Copy link
Member Author

/cherrypick release/1.7

@k8s-infra-cherrypick-robot

@samuelkarp: once the present PR merges, I will cherry-pick it on top of release/1.7 in a new PR and assign it to you.

Details

In response to this:

/cherrypick release/1.7

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-sigs/prow repository.

@samuelkarp
Copy link
Member Author

/cherrypick release/1.6

@k8s-infra-cherrypick-robot

@samuelkarp: once the present PR merges, I will cherry-pick it on top of release/1.6 in a new PR and assign it to you.

Details

In response to this:

/cherrypick release/1.6

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-sigs/prow repository.

Merged via the queue into containerd:main with commit f990308 Jul 25, 2024
@k8s-infra-cherrypick-robot

@samuelkarp: new pull request created: #10510

Details

In response to this:

/cherrypick release/1.7

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-sigs/prow repository.

@k8s-infra-cherrypick-robot

@samuelkarp: new pull request created: #10511

Details

In response to this:

/cherrypick release/1.6

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-sigs/prow repository.

@samuelkarp samuelkarp added cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch and removed cherry-pick/1.6.x cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch kind/bug size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rpc error Status failed "invalid UUID length: 0: unkown"

5 participants