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-remote] command ps with option --ns does not work well #2938

Closed
Edward5hen opened this issue Apr 15, 2019 · 2 comments · Fixed by #3080
Closed

[podman-remote] command ps with option --ns does not work well #2938

Edward5hen opened this issue Apr 15, 2019 · 2 comments · Fixed by #3080
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@Edward5hen
Copy link
Contributor

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

/kind bug

Description
On the remote node, ps command with option --ns does not show the namespace information.

Steps to reproduce the issue:

  1. On the remote node:
    PODMAN_VARLINK_ADDRESS="tcp:127.0.0.1:1234" bin/podman-remote ps --ns

Describe the results you received:

PODMAN_VARLINK_ADDRESS="tcp:127.0.0.1:1234" bin/podman-remote ps --ns                   
ERRO[0000] Could not find flag trace
CONTAINER ID  NAMES    PID    CGROUPNS  IPC  MNT  NET  PIDNS  USERNS  UTS
d93d70b86a2f  rsyslog  13022
512aa9441caa  sadc     13057

Describe the results you expected:
Should have the same result as the podman node does:

[root@localhost ~]# podman ps --ns
CONTAINER ID  NAMES    PID    CGROUPNS    IPC         MNT         NET         PIDNS       USERNS      UTS
d93d70b86a2f  rsyslog  13022  4026531835  4026532276  4026532274  4026531993  4026531836  4026531837  4026532275
512aa9441caa  sadc     13057  4026531835  4026532279  4026532277  4026531993  4026532280  4026531837  4026532278

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

Output of podman version:

Version:            1.3.0-dev
RemoteAPI Version:  1
Go Version:         go1.12.1
Git Commit:         167ce59416f6e03f4477269e33e9e5cf5b700a86
Built:              Mon Apr 15 14:55:33 2019
OS/Arch:            linux/amd64

Output of podman info --debug:

debug:
  compiler: gc
  git commit: 167ce59416f6e03f4477269e33e9e5cf5b700a86
  go version: go1.12.1
  podman version: 1.3.0-dev
host:
  BuildahVersion: 1.7.2
  Conmon:
    package: conmon-1.10.3-1.gite558bd5.fc27.x86_64
    path: /usr/libexec/crio/conmon
    version: 'conmon version 1.10.3, commit: 27d18947e07ae525daacba333e67a98a6296fc5d'
  Distribution:
    distribution: fedora
    version: "27"
  MemFree: 622895104
  MemTotal: 11980427264
  OCIRuntime:
    package: runc-1.0.0-36.gitad0f525.fc27.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc5+dev
      spec: 1.0.0
  SwapFree: 6043987968
  SwapTotal: 6043987968
  arch: amd64
  cpus: 4
  hostname: dhcp-2-7.nay.redhat.com
  kernel: 4.18.7-100.fc27.x86_64
  os: linux
  rootless: false
  uptime: 4h 29m 6.67s (Approximately 0.17 days)
insecure registries:
  registries:
  - brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888
registries:
  registries:
  - docker.io
  - registry.fedoraproject.org
  - registry.access.redhat.com
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 15
  GraphDriverName: overlay
  GraphOptions: null
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 3
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 15, 2019
@baude baude self-assigned this May 6, 2019
@baude
Copy link
Member

baude commented May 6, 2019

Using master I cannot replicate your findings. Here is my example:

CONTAINER ID  NAMES              PID    CGROUPNS    IPC         MNT         NET         PIDNS       USERNS      UTS
480b809f1e75  reverent_hamilton  30243  4026531835  4026533674  4026533672  4026533601  4026533675  4026531837  4026533673
f873d95656b7  sleepy_meninsky    28713  4026531835  4026533596  4026533594  4026533453  4026533597  4026531837  4026533595
[bbaude@localhost libpod (master)]$ sudo podman-remote ps --ns
CONTAINER ID  NAMES              PID    CGROUPNS    IPC         MNT         NET         PIDNS       USERNS      UTS
480b809f1e75  reverent_hamilton  30243  4026531835  4026533674  4026533672  4026533601  4026533675  4026531837  4026533673
f873d95656b7  sleepy_meninsky    28713  4026531835  4026533596  4026533594  4026533453  4026533597  4026531837  4026533595

Do you suspect the container you created matters?

@Edward5hen
Copy link
Contributor Author

It's been more than 20 days, I don't have the old created containers now. So I tried it with a new simple container on podman node:

podman run -d busybox sleep 1000

The same result I got on the remote node:

[root@fedora-29 bin]# ./podman-remote ps --ns
CONTAINER ID  NAMES               PID   CGROUPNS  IPC  MNT  NET  PIDNS  USERNS  UTS
a1e86ed01608  focused_mcclintock  6841

But on podman node, it just works fine:

[root@fedora-29-1 ~]# podman ps --ns
CONTAINER ID  NAMES               PID   CGROUPNS    IPC         MNT         NET         PIDNS       USERNS      UTS
a1e86ed01608  focused_mcclintock  6841  4026531835  4026532368  4026532366  4026532294  4026532369  4026531837  4026532367

On podman node:

[root@fedora-29-1 ~]# podman info
host:
  BuildahVersion: 1.8.2
  Conmon:
    package: conmon-1.12.0-12.dev.gitc4f232a.fc29.x86_64
    path: /usr/libexec/crio/conmon
    version: 'conmon version 1.12.0-dev, commit: ed74efc8af284f786e041e8a98a910db4b2c0ec7'
  Distribution:
    distribution: fedora
    version: "29"
  MemFree: 979378176
  MemTotal: 2083471360
  OCIRuntime:
    package: runc-1.0.0-92.dev.gitc1b8c57.fc29.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc7+dev
      commit: 7f820969cc1cc8ea3357b39f2e2e1514f71c6fec
      spec: 1.0.1-dev
  SwapFree: 2218258432
  SwapTotal: 2218782720
  arch: amd64
  cpus: 2
  hostname: fedora-29-1.shared
  kernel: 4.18.16-300.fc29.x86_64
  os: linux
  rootless: false
  uptime: 1h 19m 38.24s (Approximately 0.04 days)
registries:
  blocked: null
  insecure: null
  search:
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.access.redhat.com
  - registry.centos.org
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 1
  GraphDriverName: overlay
  GraphOptions:
  - overlay.mountopt=nodev
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 1
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes

on remote node:

[root@fedora-29 bin]# podman info
host:
  BuildahVersion: 1.8.2
  Conmon:
    package: conmon-1.12.0-12.dev.gitc4f232a.fc29.x86_64
    path: /usr/libexec/crio/conmon
    version: 'conmon version 1.12.0-dev, commit: ed74efc8af284f786e041e8a98a910db4b2c0ec7'
  Distribution:
    distribution: fedora
    version: "29"
  MemFree: 1095311360
  MemTotal: 2083471360
  OCIRuntime:
    package: runc-1.0.0-85.dev.gitdd22a84.fc29.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc6+dev
      commit: 1d3f73d4086533a858613bc4b6af2b5e882f4730
      spec: 1.0.1-dev
  SwapFree: 2217996288
  SwapTotal: 2218782720
  arch: amd64
  cpus: 2
  hostname: fedora-29.shared
  kernel: 4.18.16-300.fc29.x86_64
  os: linux
  rootless: false
  uptime: 35h 55m 34.77s (Approximately 1.46 days)
registries:
  blocked: null
  insecure: null
  search:
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.access.redhat.com
  - registry.centos.org
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 0
  GraphDriverName: overlay
  GraphOptions:
  - overlay.mountopt=nodev
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 1
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes

baude added a commit to baude/podman that referenced this issue May 7, 2019
the namespace for the remote client was being incorrectly derived from
the "remote" client.

fixes: containers#2938

Signed-off-by: baude <bbaude@redhat.com>
@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 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants