python-podman
python-podman copied to clipboard
"endpoint requires a more connection"
When attempting to build an image, I get this extremely nonsensical error:
>>> podcraft.poddir.build_server(pm, "/home/astraluma/.mc/qwi", {})
Traceback (most recent call last):
File "/home/astraluma/.virtualenvs/mc/podcraft/lib/python3.7/site-packages/podman/libs/images.py", line 138, in build
result = podman.BuildImage(config)
File "/home/astraluma/.virtualenvs/mc/podcraft/lib/python3.7/site-packages/varlink/client.py", line 89, in _wrapped
return self._call(method.name, *args, **kwargs)
File "/home/astraluma/.virtualenvs/mc/podcraft/lib/python3.7/site-packages/varlink/client.py", line 146, in _call
(message, more) = self._next_varlink_message()
File "/home/astraluma/.virtualenvs/mc/podcraft/lib/python3.7/site-packages/varlink/client.py", line 116, in _next_varlink_message
raise e
varlink.error.VarlinkError: {'parameters': {'reason': 'endpoint requires a more connection'}, 'error': 'io.podman.ErrorOccurred'}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/astraluma/code/mc/podcraft/podcraft/poddir.py", line 57, in build_server
'podcraft.root': serverdir,
File "/home/astraluma/.virtualenvs/mc/podcraft/lib/python3.7/site-packages/podman/libs/images.py", line 138, in build
result = podman.BuildImage(config)
File "/home/astraluma/.virtualenvs/mc/podcraft/lib/python3.7/site-packages/podman/client.py", line 109, in __exit__
raise error_factory(e)
podman.libs.errors.ErrorOccurred: {'parameters': {'reason': 'endpoint requires a more connection'}, 'error': 'io.podman.ErrorOccurred'}
The invocation is
client.images.build(
buildArgs=buildargs, # Dictionary, empty
contextDir=buildroot, # String, full path to a .tar
dockerfile=dockerfile, # String, full path to Dockerfile
tags="TODO",
annotations={
'podcraft.root': serverdir, # String, a full path (doesn't exit)
},
)
Best as I can read the go code (don't know go) and can google, this sounds like the particulars of how python-podman is constructing the varlink invocation?
https://github.com/containers/libpod/blob/d62fce0c873bdd1341af15eba4418ff83af7edba/pkg/varlinkapi/images.go#L233
https://github.com/containers/python-podman/blob/08a458a1c2d0fe74ef398b237a2ecb415e801c85/podman/libs/images.py#L138
context: https://github.com/minecraft-podman/podcraft/blob/93a2d3327a60241ab4b45944ed7c1149e11c77e0/podcraft/poddir.py#L23-L59