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 commit --change ENTRYPOINT" won't accept '=' character in it #5148

Closed
FaramosCZ opened this issue Feb 10, 2020 · 5 comments · Fixed by #5156
Closed

"podman commit --change ENTRYPOINT" won't accept '=' character in it #5148

FaramosCZ opened this issue Feb 10, 2020 · 5 comments · Fixed by #5156
Assignees
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. 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

@FaramosCZ
Copy link

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

/kind bug

Description

When running e.g.
"podman commit --change ENTRYPOINT='my_binary pidfile=xyz.pid' 012abc345def"
the command won't accept '=' character inside the ENTRYPOINT data (in this case "pidfile=xyz.pid")

Nor shell nor exec form accepts the '=' caharcter.

Steps to reproduce the issue:

  1. create commit on which you will run following command

  2. $ podman commit --change='ENTRYPOINT ["my_binary", "pidfile=xyz.pid"]' 123abc456def

Describe the results you received:
$ podman commit --change='ENTRYPOINT ["my_binary", "pidfile_xyz.pid"]' 123abc456def
WORKS

$ podman commit --change='ENTRYPOINT ["my_binary", "pidfile=xyz.pid"]' 123abc456def
Error: invalid syntax for --change: ENTRYPOINT ["my_binary", "pidfile=xyz.pid"]

$ podman commit --change='ENTRYPOINT "my_binary pidfile_xyz.pid"' 123abc456def
WORKS

$ podman commit --change='ENTRYPOINT "my_binary pidfile=xyz.pid"' 123abc456def
Error: invalid syntax for --change: ENTRYPOINT "my_binary pidfile=xyz.pid"

Describe the results you expected:
Even the commands with '=' character will work

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

Output of podman version:

podman version 1.8.0

Output of podman info --debug:

debug:
  compiler: gc
  git commit: ""
  go version: go1.13.6
  podman version: 1.8.0
host:
  BuildahVersion: 1.13.1
  CgroupVersion: v2
  Conmon:
    package: conmon-2.0.10-2.fc31.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.10, commit: 6b526d9888abb86b9e7de7dfdeec0da98ad32ee0'
  Distribution:
    distribution: fedora
    version: "31"
  IDMappings:
    gidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65536
  MemFree: 7646916608
  MemTotal: 8201723904
  OCIRuntime:
    name: crun
    package: crun-0.12.1-1.fc31.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.12.1
      commit: df5f2b2369b3d9f36d175e1183b26e5cee55dd0a
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  SwapFree: 0
  SwapTotal: 0
  arch: amd64
  cpus: 4
  eventlogger: journald
  hostname: ******
  kernel: 5.4.17-200.fc31.x86_64
  os: linux
  rootless: true
  slirp4netns:
    Executable: /usr/bin/slirp4netns
    Package: slirp4netns-0.4.0-20.1.dev.gitbbd6f25.fc31.x86_64
    Version: |-
      slirp4netns version 0.4.0-beta.3+dev
      commit: bbd6f25c70d5db2a1cd3bfb0416a8db99a75ed7e
  uptime: 1h 17m 0.1s (Approximately 0.04 days)
registries:
  search:
  - docker.io
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - quay.io
store:
  ConfigFile: /home/******/.config/containers/storage.conf
  ContainerStore:
    number: 14
  GraphDriverName: overlay
  GraphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-0.7.5-2.fc31.x86_64
      Version: |-
        fusermount3 version: 3.6.2
        fuse-overlayfs: version 0.7.5
        FUSE library version 3.6.2
        using FUSE kernel interface version 7.29
  GraphRoot: /home/******/.local/share/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 18
  RunRoot: /run/user/******/containers
  VolumePath: /home/******/.local/share/containers/storage/volumes


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

podman-1.8.0-2.fc31.x86_64

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

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 10, 2020
@FaramosCZ
Copy link
Author

NOTE:
When I write it to the containerfile, the resulting built container works as expected:
ENTRYPOINT ./my_binary pidfile=xyz.pid

@rhatdan rhatdan added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Feb 10, 2020
@rhatdan
Copy link
Member

rhatdan commented Feb 10, 2020

@QiWang19 PTAL
@FaramosCZ if you wanted to attempt a PR, that would be welcome...

@mheon
Copy link
Member

mheon commented Feb 10, 2020

I'll take this one. Confirmed locally, working on it now.

@mheon mheon assigned mheon and unassigned QiWang19 Feb 10, 2020
@mheon
Copy link
Member

mheon commented Feb 10, 2020

I think I got this... we left some parsing logic from the old --change implementation in podman commit when we swapped over.

mheon added a commit to mheon/libpod that referenced this issue Feb 10, 2020
The validation logic was failing on properly-formatted changes.
There's already validation in Commit itself, so no need to
duplicate.

Fixes containers#5148

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
@mheon
Copy link
Member

mheon commented Feb 10, 2020

#5156 should fix

mheon added a commit to mheon/libpod that referenced this issue Feb 10, 2020
The validation logic was failing on properly-formatted changes.
There's already validation in Commit itself, so no need to
duplicate.

Fixes containers#5148

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
snj33v pushed a commit to snj33v/libpod that referenced this issue May 31, 2020
The validation logic was failing on properly-formatted changes.
There's already validation in Commit itself, so no need to
duplicate.

Fixes containers#5148

Signed-off-by: Matthew 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
Good First Issue This issue would be a good issue for a first time contributor to undertake. 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.

5 participants