Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Fix using the plugin without ports #3

Merged
merged 3 commits into from
Sep 7, 2021
Merged

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Sep 3, 2021

When no ports are set we still have to return the CNI result back.
Otherwise CNI will fail with unexpected end of JSON input.

Fixes containers/podman#11413

Return the error message from gvproxy
When gvproxy returns an error we should add the body to the error
message. For example this will now look like this:
something went wrong with the request: "listen tcp 0.0.0.0:8080: bind: address already in use\n

Add gitignore
The bin directory should not be commited.

The bin directory should not be commited.

Signed-off-by: Paul Holzinger <[email protected]>
When gvproxy returns an error we should add the body to the error
message. For example this will now look like this:
`something went wrong with the request: "listen tcp 0.0.0.0:8080: bind:
address already in use\n`

Signed-off-by: Paul Holzinger <[email protected]>
When no ports are set we still have to return the CNI result back.
Otherwise CNI will fail with `unexpected end of JSON input`.

Fixes containers/podman#11413

Signed-off-by: Paul Holzinger <[email protected]>
@openshift-ci
Copy link

openshift-ci bot commented Sep 3, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Luap99
To complete the pull request process, please assign rhatdan after the PR has been reviewed.
You can assign the PR to them by writing /assign @rhatdan in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mheon
Copy link
Member

mheon commented Sep 3, 2021

LGTM

1 similar comment
@rhatdan
Copy link
Member

rhatdan commented Sep 7, 2021

LGTM

@rhatdan rhatdan merged commit 4ae55f6 into containers:main Sep 7, 2021
@Luap99 Luap99 deleted the fix-ports branch September 7, 2021 17:46
@bretonics
Copy link

Has this been merged with main podman? Experiencing the port issue on a fresh podman install, 3.3.1

@Luap99
Copy link
Member Author

Luap99 commented Oct 5, 2021

Has this been merged with main podman? Experiencing the port issue on a fresh podman install, 3.3.1

Should be fixed when the podman 3.4 update lands in CoreOS

@wilgucki
Copy link

wilgucki commented Oct 5, 2021

Should be fixed when the podman 3.4 update lands in CoreOS

I'm using latest podman version and still getting this error

(base) ➜  ~ brew list podman
/usr/local/Cellar/podman/3.4.0_1/bin/podman
/usr/local/Cellar/podman/3.4.0_1/bin/podman-remote
/usr/local/Cellar/podman/3.4.0_1/etc/bash_completion.d/podman
/usr/local/Cellar/podman/3.4.0_1/libexec/gvproxy
/usr/local/Cellar/podman/3.4.0_1/share/fish/vendor_completions.d/podman.fish
/usr/local/Cellar/podman/3.4.0_1/share/man/ (160 files)
/usr/local/Cellar/podman/3.4.0_1/share/zsh/site-functions/_podman

(base) ➜  ~ podman run --rm nginx
Error: error preparing container 1eb7123707ecb48937319d63adb42fad9cc7781b45954dd5ef9957c505cf348c for attach: error configuring network namespace for container 1eb7123707ecb48937319d63adb42fad9cc7781b45954dd5ef9957c505cf348c: error adding pod nginx_nginx to CNI network "podman": unexpected end of JSON input

@tibcoplord
Copy link

I see the same with 3.4.0_1 on mac :

$ podman machine init
...
Downloading VM image: fedora-coreos-34.20211004.2.0-qemu.x86_64.qcow2.xz: done  
...
$ podman machine start
...
$ podman run --rm nginx
...
Error: error preparing container a87cf42040406a3eb17cd19604fa863226f2bd55a0334d9c277f9dc276e6b6b5 for attach: error configuring network namespace for container a87cf42040406a3eb17cd19604fa863226f2bd55a0334d9c277f9dc276e6b6b5: error adding pod goofy_lehmann_goofy_lehmann to CNI network "podman": unexpected end of JSON input

@cosmin
Copy link

cosmin commented Oct 12, 2021

You need podman 3.4 in the CoreOS version, not on the mac. Run

podman version

and see what it says for the server version. Apparently once that's 3.4 this should work (from what I've read).

@tibcoplord
Copy link

Ah, thanks ... but the server version is determined by machine init -

$ podman machine init
Downloading VM image: fedora-coreos-34.20211004.2.0-qemu.x86_64.qcow2.xz: done  
Extracting compressed file

$ podman machine start
INFO[0000] waiting for clients...                       
INFO[0000] listening tcp://0.0.0.0:7777                 
INFO[0000] new connection from  to /var/folders/ym/8x5zb6hx2t12gsq56_0vnl8c0000gn/T/podman/qemu_podman-machine-default.sock 
Waiting for VM ...
Machine "podman-machine-default" started successfully

$ podman version
Client:
Version:      3.4.0
API Version:  3.4.0
Go Version:   go1.17.1
Built:        Thu Sep 30 19:44:31 2021
OS/Arch:      darwin/amd64

Server:
Version:      3.3.1
API Version:  3.3.1
Go Version:   go1.16.6
Built:        Mon Aug 30 21:46:36 2021
OS/Arch:      linux/amd64

@cosmin
Copy link

cosmin commented Oct 12, 2021

Indeed, and my understanding is that we’re waiting for the next version to CoreOS with podman 3.4. Not sure whether there’s a way to upgrade the machine in place or whether that will require creating a new podman machine.

@tibcoplord
Copy link

Okay, thanks.

@tibcoplord
Copy link

fedora coreos 35.20211010.1.0 looks to have fixed the issue :

$ podman machine init --image-path next
Downloading VM image: fedora-coreos-35.20211010.1.0-qemu.x86_64.qcow2.xz: done  
Extracting compressed file

$ podman machine start
INFO[0000] waiting for clients...                       
INFO[0000] listening tcp://0.0.0.0:7777                 
INFO[0000] new connection from  to /var/folders/ym/8x5zb6hx2t12gsq56_0vnl8c0000gn/T/podman/qemu_podman-machine-default.sock 
Waiting for VM ...
2021/10/15 10:14:02 tcpproxy: for incoming conn [::1]:64101, error dialing "192.168.127.2:22": connect tcp 192.168.127.2:22: no route
2021/10/15 10:14:05 tcpproxy: for incoming conn [::1]:64105, error dialing "192.168.127.2:22": connect tcp 192.168.127.2:22: no route
2021/10/15 10:14:09 tcpproxy: for incoming conn [::1]:64108, error dialing "192.168.127.2:22": connect tcp 192.168.127.2:22: no route
2021/10/15 10:14:13 tcpproxy: for incoming conn [::1]:64111, error dialing "192.168.127.2:22": connect tcp 192.168.127.2:22: no route
2021/10/15 10:14:15 tcpproxy: for incoming conn [::1]:64116, error dialing "192.168.127.2:22": connect tcp 192.168.127.2:22: connection was refused
Machine "podman-machine-default" started successfully

$ podman version
Client:
Version:      3.4.0
API Version:  3.4.0
Go Version:   go1.17.1
Built:        Thu Sep 30 19:44:31 2021
OS/Arch:      darwin/amd64

Server:
Version:      3.4.0
API Version:  3.4.0
Go Version:   go1.16.8
Built:        Thu Sep 30 20:32:16 2021
OS/Arch:      linux/amd64

$ podman run --rm nginx
...
2021/10/15 09:16:48 [notice] 1#1: using the "epoll" event method
2021/10/15 09:16:48 [notice] 1#1: nginx/1.21.3
2021/10/15 09:16:48 [notice] 1#1: built by gcc 8.3.0 (Debian 8.3.0-6) 
2021/10/15 09:16:48 [notice] 1#1: OS: Linux 5.14.10-300.fc35.x86_64
2021/10/15 09:16:48 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 524288:524288
2021/10/15 09:16:48 [notice] 1#1: start worker processes
2021/10/15 09:16:48 [notice] 1#1: start worker process 26


Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot create networks using docker-compose when using podman machine on macOS
7 participants