RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1730446 - Imagebuilder - Copying files in between stages is unexpectedly failing
Summary: Imagebuilder - Copying files in between stages is unexpectedly failing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.7
Hardware: All
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 7.8
Assignee: Nalin Dahyabhai
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1186913
TreeView+ depends on / blocked
 
Reported: 2019-07-16 18:08 UTC by Rogerio Bastos
Modified: 2023-09-14 05:31 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-10 09:32:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift imagebuilder pull 134 0 'None' closed [openshift-3.11] Bug 1730446: dockerclient newArchiveMapper: always end archiveRoot with "/" 2020-09-14 14:25:45 UTC
Github openshift origin pull 23562 0 'None' closed [release-3.11] Bug 1730446: bump(github.com/openshift/imagebuilder) 2020-09-14 14:25:45 UTC

Description Rogerio Bastos 2019-07-16 18:08:20 UTC
Description of problem:

When running imagebuilder with the following sample Dockerfile, copying a file in between stages is failing silently.


How reproducible: Always


Steps to Reproduce:
Run imagebuilder with the sample Dockerfile:


FROM openshift/origin-cli:v3.11 AS builder
RUN ls -l /bin/oc
# Multistage with python
FROM python:2.7.15 AS runner

# Bring oc binary to python image
COPY --from=builder /bin/oc /bin/

RUN ls -l /bin/oc


Actual results:
--> FROM openshift/origin-cli:v3.11 as builder
--> RUN ls -l /bin/oc
-rwxr-xr-x. 1 root root 120627192 Jul  5 15:09 /bin/oc
--> FROM python:2.7.15 as runner
--> COPY --from=builder /bin/oc /bin/
--> RUN ls -l /bin/oc
ls: cannot access '/bin/oc': No such file or directory
running 'ls -l /bin/oc' failed with exit code 2


Expected results:
The oc binary should be copied to the second stage

Additional info:
$ imagebuilder --version
1.1-dev

Comment 1 Ben Parees 2019-07-16 18:13:19 UTC
Note that the following dockerfile does work:

FROM openshift/origin-cli:v3.11 AS builder

RUN cp /bin/oc /

# Multistage with python
FROM python:2.7.15 AS runner

# Bring oc binary to python image
COPY --from=builder /oc /bin/


So copying the file into a new layer in the stage 0 image, makes it available to COPY --from in stage 1.


The main implication of this is it breaks ocp 3.11 multistage builds (which rely on imagebuilder under the covers).

Comment 2 Ben Parees 2019-07-16 18:14:36 UTC
this can be reproduced using the imagebuilder CLI tool.

Comment 3 Daniel Walsh 2019-07-17 09:48:12 UTC
I take it that this is not an issue with Buildah running the build but with the Docker.sock since this is openshift 3.11?

So not sure why this is assigned to Nalin?

Comment 4 Ben Parees 2019-07-17 14:16:30 UTC
It's not a buildah issue, it is an imagebuilder issue (it occurs both when running imagebuilder on the cli, as well as in OCP3.11 when builds use imagebuilder to build multistage dockerfiles).

Since the containers team owns imagebuilder(right?), it was assigned to that component... not sure who within the team is the right assignee.

Comment 5 Daniel Walsh 2019-07-17 21:10:54 UTC
Ok, We can leave it with Nalin for now, but I will add Tom as well.

Comment 8 Nalin Dahyabhai 2019-08-06 14:45:05 UTC
I mistakenly linked this bug to the PR against the master branch, and not the 3.11 branch.

Comment 9 Nalin Dahyabhai 2019-08-06 17:59:30 UTC
Moving back to assigned for the final PR to get this into origin's 3.11 branch.

Comment 22 Tom Sweeney 2020-06-09 20:51:42 UTC
Nalin's PR (https://github.com/openshift/origin/pull/23562) was closed in December of 2019.  Nalin/Jindrich can we close this now?  I don't believe there's any further packaging needs for this at this time.

Comment 23 Jindrich Novy 2020-06-10 09:32:29 UTC
Assuming this is now part of openshift/origin and no longer an issue. If it is, please reopen.

Comment 24 Red Hat Bugzilla 2023-09-14 05:31:57 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.