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

oscontainer: Use skopeo, not podman to extract #1671

Merged
merged 1 commit into from
Aug 25, 2020

Conversation

cgwalters
Copy link
Member

I kept running into failures trying to run this in an
unprivileged container; basically the containers stack
seems to want to try to chown() files based on the UIDs,
but we don't care about that at all for this.

What we really want is the functionality of oc image extract
but that doesn't exist yet in the podman stack and today
cosa doesn't include oc (that's a big discussion).

Comment on lines 104 to 84
subprocess.check_call(['find', '-name', '*.tar', '-exec', 'tar', 'xUf', '{}', ';'], cwd=tmpdir)
subprocess.check_call(['find', '!', '-perm', '-u+w', '-exec', 'chmod', 'u+w', '{}', ';'], cwd=tmpdir)
Copy link
Member

Choose a reason for hiding this comment

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

Hmm I think I follow, though some comments for these two would be helpful.

Copy link
Member

Choose a reason for hiding this comment

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

I'm actually surprised there isn't a command to just extract all the layers for you into a custom directory. That would also ensure it unpacks the layers in the right order. Might be a good RFE for skopeo.

Copy link
Member Author

Choose a reason for hiding this comment

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

Or probably podman image extract - it seems like oc isn't using containers/storage (which is the source of the problems here when run nested). Probably this code could get lowered into podman and then oc could vendor it or so.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added some comments.

@darkmuggle
Copy link
Contributor

Using skopeo over podman is IMO, better. I'm curious as to the error that you were seeing @cgwalters. This makes sense.

I'd proffer a lgtm, but its Friday. @cgwalters merge when ready.

@darkmuggle
Copy link
Contributor

/approve

I kept running into failures trying to run this in an
unprivileged container; basically the containers stack
seems to want to try to `chown()` files based on the UIDs,
but we don't care about that at all for this.

What we really want is the functionality of `oc image extract`
but that doesn't exist yet in the podman stack and today
cosa doesn't include `oc` (that's a big discussion).
@cgwalters cgwalters force-pushed the oscontainer-extract branch from bd49446 to da57979 Compare August 25, 2020 18:16
@jlebon
Copy link
Member

jlebon commented Aug 25, 2020

/lgtm

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, darkmuggle, jlebon

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 [cgwalters,darkmuggle,jlebon]

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 dcc211c into coreos:master Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants