Bug 1810069
Summary: | buildah is not expanding env vars in file paths | |||
---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Jeff Cantrill <jcantril> | |
Component: | Containers | Assignee: | Jindrich Novy <jnovy> | |
Status: | CLOSED ERRATA | QA Contact: | weiwei jiang <wjiang> | |
Severity: | medium | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 4.4 | CC: | adam.kaplan, aos-bugs, bparees, dwalsh, jnovy, jokerman, mpatel, nagrawal, nalin, tsweeney | |
Target Milestone: | --- | |||
Target Release: | 4.5.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | buildah 1.13.2 and newer, buildah-1.11.6-6.rhaos4.4.el8, buildah-1.11.6-8.rhaos4.5.el8 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1810174 1822207 (view as bug list) | Environment: | ||
Last Closed: | 2020-07-13 17:18:09 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 1817175, 1822031, 1822032, 1822033, 1822034, 1822035, 1822036, 1822037, 1822038 | |||
Bug Blocks: | 1822207 |
Description
Jeff Cantrill
2020-03-04 14:07:00 UTC
this is breaking logging builds on CI now that CI moved to 4.x. note that this works ok: FROM centos ENV foo=foo ADD ./${foo} /tmp/foo it's only substitution within a path segment that seems to be a problem: FROM centos ENV foo=oo ADD ./f${foo} /tmp/foo I believe this was fixed with https://github.com/containers/buildah/pull/2095 which landed in Buildah v1.13.2, but I'll need to verify. Confirmed the issue is in Buildah v1.12.0 and fixed in Buildah v1.13.2 (and for that matter Buildah v1.14.0) via https://github.com/containers/buildah/pull/2095 Jindrich, Nalin, Ben, next step? Please work with Adam Kaplan on the devex team to get the fix vendored into OCP. can start w/ this bug for 4.5: https://bugzilla.redhat.com/show_bug.cgi?id=1810174 but should probably be backported at least to 4.4.0 (if we can get it in before march 6th) or 4.4.z(if we can't). At this point is this a buildah bug or imagebuilder? Dan, It's a Buildah bug that was fixed with https://github.com/containers/buildah/pull/2095 which landed in Buildah 1.13.2. I need to figure out how to get that fix to where it needs to go for OCP 4.5 Assigning to Jindrich as I think this is just down to packaging now. Jindrich let's talk if not. Checked with buildah-1.11.6-8.rhaos4.5.el8.x86_64, moved to verified. # buildah --version buildah version 1.11.6 (image-spec 1.0.1-dev, runtime-spec 1.0.1-dev) # rpm -q buildah buildah-1.11.6-8.rhaos4.5.el8.x86_64 # cat Dockerfile FROM centos ENV foo=oo ADD ./f${foo} /tmp/foo # echo "bar" > foo # buildah bud -t foo:bar . STEP 1: FROM centos Getting image source signatures Copying blob 294dced27509 done Copying config c460095972 done Writing manifest to image destination Storing signatures STEP 2: ENV foo=oo STEP 3: ADD ./f${foo} /tmp/foo STEP 4: COMMIT foo:bar Getting image source signatures Copying blob ca4be3487ff9 skipped: already exists Copying blob 128588b1e263 done Copying config 518518f0e2 done Writing manifest to image destination Storing signatures 518518f0e2ea355a64afa4568879296063a4492d3d516a0ac538f0ccf6fed07f 518518f0e2ea355a64afa4568879296063a4492d3d516a0ac538f0ccf6fed07f # podman run -it foo:bar /bin/bash -c "cat /tmp/foo" bar Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2409 |