Sync from Crane fails with "Not Found"
When syncing from a Crane repository (containing a manifest list) into a Pulp Docker repository, the sync task fails with "Not Found". I think this is because of the way it requests the image manifests within the manifest list:
When no Accept header is set, Crane redirects to the schema-1 storage location, even though the digest may be for a schema-2 image manifests. As a result, the request fails.
Instead, the Accept header should be set to the mediaType provided in the manifest list for that manifest.
#7 Updated by Ichimonji10 about 2 years ago
I tested the patch for this issue before it was merged. When packages with a fix become available, the same test procedure should be viable. To test, I spun up a pair of VMs, with hostnames of:
I installed Pulp 2.15 on them with the Ansible playbooks in the pulp-ci repository. This playbook also installs and configures Crane. I applied the patch Ina sent me and restarted each host. I then executed the following on the first host:
pulp-admin docker repo create --repo-id=first --feed=https://registry-1.docker.io --upstream-name=busybox pulp-admin docker repo sync run --repo-id=first pulp-admin docker repo publish run --repo-id=first systemctl restart httpd # make crane re-read metadata from disk right away tail --follow /var/log/httpd/access_log
I then executed the following on the second host:
pulp-admin docker repo create --repo-id=second --feed=http://fedora-26-pulp-2-15-node1:5000 --upstream-name=first --verify-feed-ssl=false pulp-admin docker repo sync run --repo-id=second pulp-admin docker repo list --repo-id=second --details
The sync succeeded, with plenty of entries appearing in the first host's httpd access log, and with
repo list on the second host showing plenty of content.
#11 Updated by Ichimonji10 about 2 years ago
@preethi This issue can be automated. However, understand that it'll be a bit difficult, as it requires the participation of multiple hosts. Basically, the test can be written, but it will only be able to be run at this time with hosts provided by an automation QE. Our Jenkins set-up can't provide multipple hosts for tests.
Please register to edit this issue