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
Error parsing hosts.toml without any host
tree
#10027
Comments
The change from #9131 appears to have refactored some of this, but I'm not sure if it actually resolved the issue or not. It does still affect the 1.7 branch: |
Does it work fine without the extra |
No, it does not work at all without the
Nowhere in the docs does it indicate that you MUST have a host tree. If you just want to configure TLS for the registry namespace without specifying any mirrors, having root fields set without a host tree (ie no host blocks) is a perfectly valid use case. |
Description
The docs on using hosts.toml indicate that fields for the registry host namespace can be specified in the root level:
https://github.com/containerd/containerd/blob/release/1.7/docs/hosts.md
However, containerd fails to parse the config file if only root fields are passed, for example:
When pulling from
172-17-0-7.sslip.io
, containerd will log the following error:However, the following file with a stub host tree will work as intended:
Steps to reproduce the issue
Describe the results you received and expected
hosts.toml should be usable with no
hosts
tree, just root-level fields, as described in the docs.What version of containerd are you using?
v1.7.11-k3s2
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
The text was updated successfully, but these errors were encountered: