-
Notifications
You must be signed in to change notification settings - Fork 2.6k
podman farm and registries with insecure ports #21338
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
Comments
@umohnani8 PTAL |
Yes that is because you are running your registry on your local machine and it is not something that is accessible by the farm machine on localhost. To be able to push to your local registry from your farm node, you will have to make the registry accessible to other machines. I believe steps for that are to expose the registry port and use the local machine's ip address, but I haven't tested that out. Also was your build successful? It looks like it is trying to do a premature push and I am not able to reproduce your error. |
The issue was with the parsing, not with the actual setup of the registry. The real details can be found here: The build goes fine, and I still have my old deployment, but I think that registry now moved from Docker to CNCF (much like Compose): https://docs.docker.com/registry/ (v2 was called "distribution") -> https://distribution.github.io/distribution/ It might need an example on how to set it up, since it seems to be a requirement Error: cannot create manifest list without a name, value for --tag is required Error: "testbuild" is not a full image reference name As far as I can tell, the farm build defaults to multi-arch and manifests and thus requires a registry to push to? It doesn't seem to be able to do a single host build, like building on a remote server and copying back to local. |
Something like this, to run the registry on localhost (i.e. 0.0.0.0):
And to mimic the default docker settings, where localhost is HTTP: registries.conf [[registry]]
location = "localhost:5000"
insecure = true EDIT: Note, "localhost" is just an example - could be any local host. |
I think I know why you are hitting that error, what version of podman are you running on your farm machine? The version there also needs to be v4.9.0, as we updated the push semantics to support the farm build work. Can you please update that and try again. Yes, the farm requires a registry to push to for all build. Even if you build on a single machine, it will create a manifest list and push that as well. There is no restriction on how many architectures you can build for, you can build for one to a many as you would like but we will always push the built images to a registry, create a manifest list with the digests of the images pushed to the registry and then finally push that manifest list to the registry as well. Currently there is no way to pull the images back to local. For that you will have to do a |
Ah, OK. Didn't know that it needed a newer server as well. (It was I figured it would work with the older server version, since Fedora CoreOS isn't synched afaik It seems to work much better with the parsing, after upgrading the remote version to match
But I am not sure that is reading the registries.conf, since it doesn't find the "insecure" flag:
|
Can you try with the We are sending authentication information from the local machine, but I think we are not sending the registries.conf information. I will add that to my todo. |
Now it worked better, got some error output at the end but the image got uploaded.
EDIT: Probably a result of earlier testing, and trying to overwrite an image with a manifest?
|
The workaround is good enough for now, can create a separate issue for tracking the registries.conf feature. |
@afbjorklund awesome! Thank you for testing this out! Yes the error you saw is from your earlier testing that failed and we detected an image/list with an existing name and failed to clear it. I will look into making that error make more sense. And another issue on the registries.conf part will be great, thank you! Please assign it to me. |
Will test with two Lima, one for each arch, and then I think we can close it. (+ open a backlog issue) It doesn't work for Podman Machine, since you can only start one machine at a time (i.e. since 4.5). |
Yeah the plan is to ensure that farm build works with multiple podman machines once we are able to have multiple of them running in parallel. |
Wow, running Fedora in emulation is slooow. The selinux bootup actually made cloud-init time out, for the first boot... https://lima-vm.io/docs/config/multi-arch/ Starting amd64: 20 seconds
Starting arm64: 6 minutes (!)
But at least the feature seems to be working:
Now the build is available on the host, from localhost:5000/testbuild. $ podman-remote-static --version
podman-remote-static version 4.9.0
$ limactl shell podman-amd64 podman --version
podman version 4.9.0
$ limactl shell podman-amd64 rpm -q podman
podman-4.9.0-1.fc39.x86_64
$ limactl shell podman-arm64 podman --version
podman version 4.9.0
$ limactl shell podman-arm64 rpm -q podman
podman-4.9.0-1.fc39.aarch64 There are some issues around it, though.
Workaround: --connection=lima-podman-amd64 (or run local)
Workaround: limactl shell podman-arm64 sudo setenforce 0 |
So the issue here was:
Some other takeaways:
|
Issue Description
It seems like the new
podman farm
doesn't support local registries, such as docker distribution?Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
Error: build: building: 1 error occurred:
* pushing image {"063b93b4f7a0c41748e4a457d56b73afc8226682d7fe57a2ee0fbb3fc7e1fea6" "docker-archive"} to registry: Invalid image name "localhost:5000/testbuild@@unknown-digest@@", unknown transport "localhost"
Describe the results you expected
It was expected to be able to parse host:port
podman info output
If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.
Client: v4.9.0
Server: v4.8.3, "Fedora Linux 39 (Cloud Edition)", amd64
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting
The text was updated successfully, but these errors were encountered: