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

libpod-2.0.0_rc7 & libpod-2.0.0 truncate ENV values when set from ARGS on '=' #6785

Closed
srcshelton opened this issue Jun 25, 2020 · 2 comments
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

@srcshelton
Copy link
Contributor

srcshelton commented Jun 25, 2020

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

/kind bug

Description

With podman-2.0.0_rc6 and prior, it was possible to define a multi-value ARG (with a value such as 'a=1 b=2 c=3 d=4') and then set a persistent ENV variable equal to this ephemeral argument - and inspecting the resultant image can confirm that the variable has the same value.

However, since podman-2.0.0_rc7 including the release version podman-2.0.0, inspecting the resulting image shows that only the text up to the first equals sign in ARG has been saved into the ENV value, and the remainder have been lost.

(This may be a buildah issue, I'll file a bug there too: the problem appears between 1.15.0-dev and 1.15.0)

Steps to reproduce the issue:

  1. Create a Docker Dockerfile file with the following content:
FROM scratch
ARG multivalarg="a=1 b=2 c=3 d=4"
ENV multival="${multivalarg}"

N.B. This works:

FROM scratch
ARG multivalarg="a b c d"
ENV multival="${multivalarg}"
  1. Build the container;

  2. Inspect the image variables (podman inspect -f '{{ .Config.Env }}' test):

Describe the results you received:

podman-2.0.0_rc6 and previous:

[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin multival=a=1 b=2 c=3 d=4]

podman-2.0.0_rc7 and later:

[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin multival=a]

Describe the results you expected:

multival=a=1 b=2 c=3 d=4

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

Error is consistent on every build with the specified versions.

Output of podman version:

Working:

podman version 2.0.0-rc6

Broken:

podman version 2.0.0-rc7 & podman version 2.0.0

Output of podman info --debug:

Last working:

host:
  arch: amd64
  buildahVersion: 1.15.0-dev
  cgroupVersion: v1
  conmon:
    package: Unknown
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.17, commit: 41877362fc4685d55e0473d2e4a1cbe5e1debee0'
  cpus: 8
  distribution:
    distribution: gentoo
    version: unknown
  eventLogger: file
  hostname: dellr330
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.4.38-gentoo
  linkmode: dynamic
  memFree: 2226089984
  memTotal: 8132182016
  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/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 25200410624
  swapTotal: 25769787392
  uptime: 491h 48m 40.33s (Approximately 20.46 days)
registries:
  search:
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 3
    paused: 0
    running: 1
    stopped: 2
  graphDriverName: overlay
  graphOptions:
    overlay.ignore_chown_errors: "false"
  graphRoot: /space/podman/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 742
  runRoot: /space/podman/run
  volumePath: /space/podman/storage/volumes
version:
  APIVersion: 1
  Built: 1593119632
  BuiltTime: Thu Jun 25 21:13:52 2020
  GitCommit: e74e84aa0637033c821955d817fca85f56a90d85
  GoVersion: go1.14.2
  OsArch: linux/amd64
  Version: 2.0.0-rc6

First broken:

host:
  arch: amd64
  buildahVersion: 1.15.0
  cgroupVersion: v1
  conmon:
    package: Unknown
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.17, commit: 41877362fc4685d55e0473d2e4a1cbe5e1debee0'
  cpus: 8
  distribution:
    distribution: gentoo
    version: unknown
  eventLogger: file
  hostname: dellr330
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.4.38-gentoo
  linkmode: dynamic
  memFree: 2203295744
  memTotal: 8132182016
  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/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 25200410624
  swapTotal: 25769787392
  uptime: 491h 51m 46.03s (Approximately 20.46 days)
registries:
  search:
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 3
    paused: 0
    running: 1
    stopped: 2
  graphDriverName: overlay
  graphOptions:
    overlay.ignore_chown_errors: "false"
  graphRoot: /space/podman/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 742
  runRoot: /space/podman/run
  volumePath: /space/podman/storage/volumes
version:
  APIVersion: 1
  Built: 1593117958
  BuiltTime: Thu Jun 25 20:45:58 2020
  GitCommit: 5460ea87d48ea6c10a5ef3c753c57e27b3356aae
  GoVersion: go1.14.2
  OsArch: linux/amd64
  Version: 2.0.0-rc7
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 25, 2020
@srcshelton srcshelton changed the title libpod-2.0.0_rc7 & libpod-2.0.0 truncate ENV values when set from ARGS libpod-2.0.0_rc7 & libpod-2.0.0 truncate ENV values when set from ARGS on '=' Jun 25, 2020
@srcshelton
Copy link
Contributor Author

buildah issue containers/buildah#2424

@srcshelton
Copy link
Contributor Author

Fixed in podman-2.0.2! 👍

@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

No branches or pull requests

2 participants