Yes, indeed. Thanks a lot for spotting that. A common configuration-only package does seem to be the most reasonable solution.
Regards, Qi -----Original Message----- From: Bruce Ashfield <[email protected]> Sent: Friday, February 17, 2023 9:55 PM To: Chen, Qi <[email protected]> Cc: [email protected] Subject: Re: [meta-virtualization][PATCH 2/2] cri-o: create registries.conf to avoid image inspection error On Fri, Feb 17, 2023 at 4:20 AM Chen Qi <[email protected]> wrote: > > When deploying a simple workload using 'kubectl appy -f', we met the > following error. > > Failed to inspect image "ubuntu:latest": rpc error: code = Unknown > desc = short-name "ubuntu:latest" did not resolve to an alias and > no containers-registries.conf(5) was found > > Create a registries.conf and install it to /etc/containers to fix this > issue. The contents come from test/registries.conf in cri-o git repo, > with test specific alias removed. This will conflict with skopeo if both are installed in the same image. Let's drop this patch, as I have a WIP change to create a configuration-only package that adds files like these. I can clean it up and push it to master-next shortly. Bruce > > Signed-off-by: Chen Qi <[email protected]> > --- > recipes-containers/cri-o/cri-o_git.bb | 2 ++ > recipes-containers/cri-o/files/registries.conf | 1 + > 2 files changed, 3 insertions(+) > create mode 100644 recipes-containers/cri-o/files/registries.conf > > diff --git a/recipes-containers/cri-o/cri-o_git.bb > b/recipes-containers/cri-o/cri-o_git.bb > index f69dc0f..6e58b49 100644 > --- a/recipes-containers/cri-o/cri-o_git.bb > +++ b/recipes-containers/cri-o/cri-o_git.bb > @@ -19,6 +19,7 @@ SRC_URI = "\ > > git://github.com/kubernetes-sigs/cri-o.git;branch=release-1.25;name=cri-o;protocol=https > \ > file://0001-Makefile-force-symlinks.patch \ > file://crio.conf \ > + file://registries.conf \ > " > > # Apache-2.0 for docker > @@ -100,6 +101,7 @@ do_install() { > install -d ${D}${localstatedir}/lib/crio > install -d ${D}${sysconfdir}/containers > install -m 0644 ${S}/src/import/contrib/policy.json > ${D}${sysconfdir}/containers > + install -m 0644 ${WORKDIR}/registries.conf > + ${D}${sysconfdir}/containers > } > > FILES:${PN}-config = "${sysconfdir}/crio/config/*" > diff --git a/recipes-containers/cri-o/files/registries.conf > b/recipes-containers/cri-o/files/registries.conf > new file mode 100644 > index 0000000..0b929da > --- /dev/null > +++ b/recipes-containers/cri-o/files/registries.conf > @@ -0,0 +1 @@ > +unqualified-search-registries = ['quay.io' > +,'registry.access.redhat.com', 'registry.fedoraproject.org', > +'docker.io'] > -- > 2.37.1 > > > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#7869): https://lists.yoctoproject.org/g/meta-virtualization/message/7869 Mute This Topic: https://lists.yoctoproject.org/mt/97025063/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
