Skip to content
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

network_mode=host is not working as expected #406

Closed
palko444 opened this issue Jan 17, 2022 · 4 comments
Closed

network_mode=host is not working as expected #406

palko444 opened this issue Jan 17, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@palko444
Copy link

Describe the bug
it seems after upgrade to new version of podman-compose network_mode=host is not working as expected
Its working ok with older version of podman-compose. All i did to fix issue, was dnf downgrade podman-compose

old version - working

using podman version: podman version 3.4.2
podman-composer version  0.1.7dev
podman --version
podman version 3.4.2

new version - not working

['podman', '--version', '']
using podman version: 3.4.4
podman-composer version  1.0.3
podman --version 
podman version 3.4.4
exit code: 0

To Reproduce
Use new version of docker-compose mentioned up, with this compose file

version: "3.7"
services:
node_exporter:
image: quay.io/prometheus/node-exporter:v1.3.1
container_name: node_exporter1
command:
- '--path.rootfs=/host'
network_mode: host
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'

Expected behavior
I would expect node_exporter port 9100 would be accessible from host network.

Actual behavior
port is not accesible

Output

$ podman-compose version
using podman version: 3.4.0
podman-composer version  0.1.7dev
podman --version 
podman version 3.4.0

$ podman-compose up
...

Environment:

  • OS: fedora 34/35

Additional context
It seems also infra container is missing in output of podman ps -a, it could be related to issue #404

Thank you in advance
Br Palo

@palko444 palko444 added the bug Something isn't working label Jan 17, 2022
@muayyad-alsadi
Copy link
Collaborator

this was fixed in #397

15e0ab9

commit 15e0ab92618b0d5b9c7974ceb7910caeb13542bd
Author: Muayyad alsadi <alsadi@gmail.com>
Date:   Wed Jan 12 15:44:47 2022 +0200

    FIXES #397: support host network mode

please use latest devel until we make a new release

pip3 install --user https://github.com/containers/podman-compose/archive/devel.tar.gz

@casavaca
Copy link

this was fixed in #397

15e0ab9

commit 15e0ab92618b0d5b9c7974ceb7910caeb13542bd
Author: Muayyad alsadi <alsadi@gmail.com>
Date:   Wed Jan 12 15:44:47 2022 +0200

    FIXES #397: support host network mode

please use latest devel until we make a new release

pip3 install --user https://github.com/containers/podman-compose/archive/devel.tar.gz

It seems that your recent commit re-introduced this bug? 9eda56c?diff=split?diff=split

@muayyad-alsadi
Copy link
Collaborator

muayyad-alsadi commented Jun 29, 2022

it was introduced when trying to have both network mode (eg. slirp4netns) and network options.
it should be fixed now.

@henriquemattos
Copy link

Wasn't there any release since July 2022?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants