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

Use relative symlinks for disk mirroring #317

Merged

Conversation

shaneboulden
Copy link
Contributor

Presently disk mirroring via oc adm release mirror ... --to-dir creates absolute symlinks in the mirrored release. This means that the absolute path to manifests needs to recreated when transferring the mirrored content into a disconnected environment, or changing the symlinks from absolute to relative.

This PR instead creates relative symlinks in v2/openshift/release/manifests, allowing the content to be transferred without modifications.

@openshift-ci-robot
Copy link

Hi @shaneboulden. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 24, 2020
@shaneboulden
Copy link
Contributor Author

/assign @soltysh

@@ -239,7 +239,7 @@ func (s *fileManifestService) Put(ctx context.Context, manifest distribution.Man
for _, option := range options {
if opt, ok := option.(distribution.WithTagOption); ok {
tagPath := filepath.Join(s.r.basePath, "v2", s.r.repoPath, "manifests", opt.Tag)
if err := atomicSymlink(tagPath, manifestPath); err != nil {
if err := atomicSymlink(tagPath, dgst.String()); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

I'll defer to @smarterclayton who wrote the original bit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@smarterclayton appreciate any thoughts

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems correct, but would need to test it. The manifest itself should be a hardline, so if this is local that's fine.

@soltysh
Copy link
Member

soltysh commented Feb 26, 2020

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 26, 2020
@soltysh soltysh assigned smarterclayton and unassigned soltysh Mar 16, 2020
@smarterclayton
Copy link
Contributor

Tested locally, this is fine.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 23, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shaneboulden, smarterclayton

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:

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 23, 2020
@openshift-merge-robot openshift-merge-robot merged commit 344fe33 into openshift:master Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants