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

copier: RemoveAll possibly-directories #3656

Merged
merged 1 commit into from Nov 30, 2021

Conversation

nalind
Copy link
Member

@nalind nalind commented Nov 29, 2021

What type of PR is this?

/kind bug

What this PR does / why we need it:

When we attempt to remove a directory to make way for a non-directory as part of extracting content, use RemoveAll() instead of Remove().

How to verify it

Added to a unit test!

Which issue(s) this PR fixes:

Fixes #3655

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

When we attempt to remove a directory to make way for a non-directory as
part of extracting content, use RemoveAll() instead of Remove().

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
@openshift-ci openshift-ci bot added kind/bug Categorizes issue or PR as related to a bug. approved labels Nov 29, 2021
@rhatdan
Copy link
Member

rhatdan commented Nov 29, 2021

Copy link
Collaborator

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 30, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, giuseppe, nalind

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [flouthoc,giuseppe,nalind]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 898db43 into containers:main Nov 30, 2021
@vrothberg
Copy link
Member

Thanks, Nalin! That got me further but COPY --from=fedora / / is now failing with:

[...] error creating "/var/spool/mail": stat /var/spool/mail: too many levels of symbolic link

@nalind nalind deleted the copier-removeall branch November 30, 2021 14:26
@nalind
Copy link
Member Author

nalind commented Nov 30, 2021

I can't reproduce that here with the Dockerfile from #3655. What's the digest of the fedora image you're copying from? Perhaps it's different from the latest I just pulled on amd64?

@vrothberg
Copy link
Member

Apologies, I used a braindump with another base image. It works with busybox but fails with alpine:

from alpine           
copy --from=fedora / /

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved kind/bug Categorizes issue or PR as related to a bug. lgtm locked - please file new issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error when copying entire root FS of image
6 participants