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
Use relative symlinks for disk mirroring #317
Conversation
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 Once the patch is verified, the new status will be reflected by the 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. |
/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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smarterclayton appreciate any thoughts
There was a problem hiding this comment.
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.
/ok-to-test |
Tested locally, this is fine. /lgtm |
[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 |
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.