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

podman machine inspect should report IP address #16353

Closed
asgeirn opened this issue Oct 31, 2022 · 5 comments
Closed

podman machine inspect should report IP address #16353

asgeirn opened this issue Oct 31, 2022 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote stale-issue windows issue/bug on Windows

Comments

@asgeirn
Copy link

asgeirn commented Oct 31, 2022

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

Description

I am using Podman 4.3.0 on Windows 11 WSL2, and attempting to contact the podman machine from another Linux distribution.

The default podman system connection list SSH URI contains localhost as host name, and this does not resolve properly from within another WSL distro.

I have worked around this by obtaining the IP address of the podman machine, but as this changes every time the machine is started (and ifconfig is unavailable) this is klunky.

Steps to reproduce the issue:

  1. podman machine start

  2. podman machine inspect

  3. Look for IP address in the JSON output.

Describe the results you received:

  • No Ip address in the JSON output.

Describe the results you expected:

An IP address so I can construct a CONTAINER_HOST URL that works from within a WSL distro.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

From Windows

Client:       Podman Engine
Version:      4.3.0
API Version:  4.3.0
Go Version:   go1.18.7
Git Commit:   ad42af94903ce4f3c3cd0693e4e17e4286bf094b
Built:        Wed Oct 19 19:53:21 2022
OS/Arch:      windows/amd64

Server:       Podman Engine
Version:      4.2.1
API Version:  4.2.1
Go Version:   go1.18.5
Built:        Wed Sep  7 21:58:19 2022
OS/Arch:      linux/amd64

From Ubuntu

Client:       Podman Engine
Version:      4.3.0
API Version:  4.3.0
Go Version:   go1.18.1
Built:        Sun Oct 30 08:31:24 2022
OS/Arch:      linux/amd64

Server:       Podman Engine
Version:      4.2.1
API Version:  4.2.1
Go Version:   go1.18.5
Built:        Wed Sep  7 21:58:19 2022
OS/Arch:      linux/amd64

Output of podman info:

host:
  arch: amd64
  buildahVersion: 1.27.0
  cgroupControllers: []
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.1.4-3.fc36.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.4, commit: '
  cpuUtilization:
    idlePercent: 98.15
    systemPercent: 0.49
    userPercent: 1.36
  cpus: 8
  distribution:
    distribution: fedora
    variant: container
    version: "36"
  eventLogger: journald
  hostname: LAPTOP-FLVFIRID
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.15.68.1-microsoft-standard-WSL2
  linkmode: dynamic
  logDriver: journald
  memFree: 2765078528
  memTotal: 8331952128
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.6-2.fc36.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.6
      commit: 18cf2efbb8feb2b2f20e316520e0fd0b6c41ef4d
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-0.2.beta.0.fc36.x86_64
    version: |-
      slirp4netns version 1.2.0-beta.0
      commit: 477db14a24ff1a3de3a705e51ca2c4c1fe3dda64
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 17178021888
  swapTotal: 17179869184
  uptime: 4h 46m 31.00s (Approximately 0.17 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/user/.config/containers/storage.conf
  containerStore:
    number: 1
    paused: 0
    running: 0
    stopped: 1
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/user/.local/share/containers/storage
  graphRootAllocated: 1081101176832
  graphRootUsed: 5510799360
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 77
  runRoot: /run/user/1000/containers
  volumePath: /home/user/.local/share/containers/storage/volumes
version:
  APIVersion: 4.2.1
  Built: 1662580699
  BuiltTime: Wed Sep  7 21:58:19 2022
  GitCommit: ""
  GoVersion: go1.18.5
  Os: linux
  OsArch: linux/amd64
  Version: 4.2.1

Package info (e.g. output of rpm -q podman or apt list podman or brew info podman):

Installed from https://github.com/containers/podman/releases/latest

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

Host is a Windows 11 laptop with WSL2. Client is an Ubuntu 22.04 WSL distribution.

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 31, 2022
@github-actions github-actions bot added remote Problem is in podman-remote windows issue/bug on Windows labels Oct 31, 2022
@mheon
Copy link
Member

mheon commented Oct 31, 2022

@n1hility I recall hearing that there is a shared space in the WSL VM that all WSL distros can access where we can put the Podman socket to avoid this?

@asgeirn
Copy link
Author

asgeirn commented Oct 31, 2022

You could probably use /mnt/wsl for this. I tried writing a file from podman-machine, and it's readable within the Ubuntu distro.

@asgeirn
Copy link
Author

asgeirn commented Oct 31, 2022

Yup, that worked - but requires that the UIDs match.

In podman-machine:

podman system service --time=0 unix:///mnt/wsl/podman.sock

In Ubuntu machine:

podman --url unix:///mnt/wsl/podman.sock version

@github-actions
Copy link

github-actions bot commented Dec 1, 2022

A friendly reminder that this issue had no activity for 30 days.

@n1hility
Copy link
Member

n1hility commented Dec 1, 2022

Closing as a dup of #15190

@n1hility n1hility closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 8, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote stale-issue windows issue/bug on Windows
Projects
None yet
Development

No branches or pull requests

3 participants