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

location of the --remote flag breaks commands. #6704

Closed
trusch opened this issue Jun 22, 2020 · 3 comments · Fixed by #6716
Closed

location of the --remote flag breaks commands. #6704

trusch opened this issue Jun 22, 2020 · 3 comments · Fixed by #6716
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. remote Problem is in podman-remote

Comments

@trusch
Copy link
Contributor

trusch commented Jun 22, 2020

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

/kind bug

Description

The location of the --remote flag changes the behavior of the command line parsing.

Steps to reproduce the issue:

~ podman system service -t 0 & 
[1] 65413
➜  ~ podman ps --remote
CONTAINER ID  IMAGE   COMMAND  CREATED  STATUS  PORTS   NAMES
➜  ~ podman --remote ps
Error: unrecognized command `podman ps`
Try 'podman --help' for more information.
➜  ~ kill %
[1]  + 65413 terminated  podman system service -t 0    

Describe the results you received:

podman --remote ps doesn't work

Describe the results you expected:

podman ps --remote and podman --remote ps should be equivalent.

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

Output of podman version:

~ podman version
Version:      2.0.0
API Version:  1
Go Version:   go1.14.4
Git Commit:   eec482cae3289ecaad45c602629657da7062ce9c
Built:        Sat Jun 20 14:30:13 2020
OS/Arch:      linux/amd64

Output of podman info --debug:

➜  ~ podman info --debug
host:
  arch: amd64
  buildahVersion: 1.15.0
  cgroupVersion: v1
  conmon:
    package: Unknown
    path: /usr/bin/conmon
    version: 'conmon version 2.0.18, commit: 7b3e303be8f1aea7e0d4a784c8e64a75c14756a4'
  cpus: 4
  distribution:
    distribution: arch
    version: unknown
  eventLogger: file
  hostname: carbon
  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.7.4-arch1-1
  linkmode: dynamic
  memFree: 2045399040
  memTotal: 8218943488
  ociRuntime:
    name: runc
    package: Unknown
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc10
      commit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
      spec: 1.0.1-dev
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  rootless: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: Unknown
    version: |-
      slirp4netns version 1.1.1
      commit: bbf27c5acd4356edb97fa639b4e15e0cd56a39d5
      libslirp: 4.3.0
      SLIRP_CONFIG_VERSION_MAX: 3
  swapFree: 0
  swapTotal: 0
  uptime: 1h 30m 43.76s (Approximately 0.04 days)
registries:
  search:
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.access.redhat.com
  - registry.centos.org
store:
  configFile: /home/tino/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: Unknown
      Version: |-
        fusermount3 version: 3.9.2
        fuse-overlayfs: version 1.1.0
        FUSE library version 3.9.2
        using FUSE kernel interface version 7.31
  graphRoot: /home/tino/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 366
  runRoot: /run/user/1000
  volumePath: /home/tino/.local/share/containers/storage/volumes
version:
  APIVersion: 1
  Built: 1592656213
  BuiltTime: Sat Jun 20 14:30:13 2020
  GitCommit: eec482cae3289ecaad45c602629657da7062ce9c
  GoVersion: go1.14.4
  OsArch: linux/amd64
  Version: 2.0.0

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

➜  ~ pacman -Q podman
podman 2.0.0-1

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

tested on my local laptop running archlinux.

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 22, 2020
@baude
Copy link
Member

baude commented Jun 22, 2020

@jwhonce i personally dont think podman ps --remote should be valid. wdyt?

@mheon
Copy link
Member

mheon commented Jun 22, 2020

Flags like --log-level are already valid to pass as both global and command-level, so there is precedent (and the code is already set up that way)

@afbjorklund
Copy link
Contributor

Pretty much the same issue that I had in #6598, had to insert a fake argument to make it work.

podman --remote podman ps

@mheon mheon added the remote Problem is in podman-remote label Jun 22, 2020
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 22, 2020
Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 22, 2020
Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 23, 2020
Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 24, 2020
Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 24, 2020
Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 24, 2020
Fixes --remote flag being given anywhere on the command without
a value.

Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 24, 2020
Fixes --remote flag being given anywhere on the command without
a value.

Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 25, 2020
Fixes --remote flag being given anywhere on the command without
a value.

Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 25, 2020
Fixes --remote flag being given anywhere on the command without
a value.

Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 25, 2020
Fixes --remote flag being given anywhere on the command without
a value.

Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 26, 2020
* --remote, --url and --identity are now anchored to podman command.
  Subcommands should no longer have issues
* TraverseChildren now set to V1 expectations
* Latest flag now has helper function. Now has consistent usage.
* IsRemote() uses cobra parser to determin if --remote is given
* Moved validation functions from parser pkg to validate pkg
*

Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Jun 27, 2020
* --remote, --url and --identity are now anchored to podman command.
  Subcommands should no longer have issues
* TraverseChildren now set to V1 expectations
* Latest flag now has helper function. Now has consistent usage.
* IsRemote() uses cobra parser to determin if --remote is given
* Moved validation functions from parser pkg to validate pkg
*

Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>
mheon pushed a commit to mheon/libpod that referenced this issue Jul 6, 2020
* --remote, --url and --identity are now anchored to podman command.
  Subcommands should no longer have issues
* TraverseChildren now set to V1 expectations
* Latest flag now has helper function. Now has consistent usage.
* IsRemote() uses cobra parser to determin if --remote is given
* Moved validation functions from parser pkg to validate pkg
*

Fixes containers#6598
Fixes containers#6704

Signed-off-by: Jhon Honce <jhonce@redhat.com>

<MH: Fixed import issues>

Signed-off-by: Matt Heon <matthew.heon@pm.me>
@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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 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. remote Problem is in podman-remote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants