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 v2.0.2 start command is no longer silent with --attach flag #7055

Closed
buvoli opened this issue Jul 22, 2020 · 2 comments · Fixed by #7068
Closed

Podman v2.0.2 start command is no longer silent with --attach flag #7055

buvoli opened this issue Jul 22, 2020 · 2 comments · Fixed by #7068
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

@buvoli
Copy link

buvoli commented Jul 22, 2020

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

/kind bug

Description:

The podman v2.0.2 start command is not silent when the --attach flag is used.

Steps to reproduce the issue:

A simple proof of concept to highlight the issue:

  1. $ ID=$(podman create -ti fedora:latest bash)
  2. $ podman start --attach --interactive $ID

Describe the results you received:

container ID prints out after container exits

$ ID=$(podman create -ti fedora:latest bash)
$ podman start --attach --interactive $ID
[root@5319738ee82e /]# exit
exit
5319738ee82e07152dde5d5c3b9e4732754738f9c4e8f3df9c69fd6db2a1b8dd
$

Describe the results you expected:

The output should be consistent with Docker and Podman 1.9 (i.e. there should be no id printed)

$ ID=$(podman create -ti fedora:latest bash)
$ podman start --attach --interactive $ID
[root@5319738ee82e /]# exit
exit
$

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

Output of podman version:

Version:      2.0.2
API Version:  1
Go Version:   go1.14.3
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.15.0
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.18-1.fc32.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.18, commit: 6e8799f576f11f902cd8a8d8b45b2b2caf636a85'
  cpus: 2
  distribution:
    distribution: fedora
    version: "32"
  eventLogger: file
  hostname: ip-172-31-93-91.ec2.internal
  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.6.6-300.fc32.x86_64
  linkmode: dynamic
  memFree: 263057408
  memTotal: 2042073088
  ociRuntime:
    name: crun
    package: crun-0.14.1-1.fc32.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.14.1
      commit: 598ea5e192ca12d4f6378217d3ab1415efeddefa
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  rootless: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.1-1.fc32.x86_64
    version: |-
      slirp4netns version 1.1.1
      commit: bbf27c5acd4356edb97fa639b4e15e0cd56a39d5
      libslirp: 4.3.1
      SLIRP_CONFIG_VERSION_MAX: 2
  swapFree: 0
  swapTotal: 0
  uptime: 174h 35m 50.52s (Approximately 7.25 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /home/fedora/.config/containers/storage.conf
  containerStore:
    number: 6
    paused: 0
    running: 1
    stopped: 5
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.1.2-1.fc32.x86_64
      Version: |-
        fusermount3 version: 3.9.1
        fuse-overlayfs: version 1.1.0
        FUSE library version 3.9.1
        using FUSE kernel interface version 7.31
  graphRoot: /home/fedora/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 17
  runRoot: /run/user/1000/containers
  volumePath: /home/fedora/.local/share/containers/storage/volumes
version:
  APIVersion: 1
  Built: 0
  BuiltTime: Thu Jan  1 00:00:00 1970
  GitCommit: ""
  GoVersion: go1.14.3
  OsArch: linux/amd64
  Version: 2.0.2

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

podman-2.0.2-1.fc32.x86_64

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

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

mheon commented Jul 22, 2020

It's specific to -i being passed.

@mheon mheon self-assigned this Jul 23, 2020
mheon added a commit to mheon/libpod that referenced this issue Jul 23, 2020
Somewhere in the Podman v2 rewrite, we allowed
`podman start --attach` to print the container ID of the started
container after exiting from the attach session (via detach key
or the container exiting naturally). We should never print the ID
when `--attach` is given, which makes the fix simple - make the
print statement conditional on `--attach` not being present.

Wierdly, this only happened with `--interactive` was given to
`podman start`. I don't know why that is, but this resolves the
issue without having to dig any deeper, so I'm content.

Fixes containers#7055

Signed-off-by: Matthew Heon <[email protected]>
@mheon
Copy link
Member

mheon commented Jul 23, 2020

#7068 to fix

mheon added a commit to mheon/libpod that referenced this issue Jul 31, 2020
Somewhere in the Podman v2 rewrite, we allowed
`podman start --attach` to print the container ID of the started
container after exiting from the attach session (via detach key
or the container exiting naturally). We should never print the ID
when `--attach` is given, which makes the fix simple - make the
print statement conditional on `--attach` not being present.

Wierdly, this only happened with `--interactive` was given to
`podman start`. I don't know why that is, but this resolves the
issue without having to dig any deeper, so I'm content.

Fixes containers#7055

Signed-off-by: Matthew Heon <[email protected]>
@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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants