Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When creating a repository of content_type docker, it is not possible to define download_policy to "on_demand", as it is the case and correctly documented for the content_type yum:
[root@satellite ~]# hammer repository update --help |grep -A1 download-policy
--download-policy DOWNLOAD_POLICY Download policy for yum repos (either 'immediate',
'on_demand', or 'background (deprecated)')
Example on one single repository, in which the initial sync downloaded all blobs:
[root@satellite ~]# du -sk /var/lib/pulp ; hammer repository sync --id 16 --organization-id 1 ; du -sk /var/lib/pulp
3147168 /var/lib/pulp
[....................................................................................................................] [100%]
New blobs: 924.
9165392 /var/lib/pulp
[root@satellite ~]#
That's roughly 5.7GB used by one single container, out of 117 different ones required by RHOSP 16.1. The downloaded tags include not only older versions that will never be used, but also others with tags such as *-source.
Being able to download images as they are pulled would save a lot of space (> 100GB on the initial sync of RHOSP 16.1) and also make the initial sync way faster. Only when an image is being pulled from satellite, the required blobs would be downloaded, depending on the tag specified as part of the pull.
Version-Release number of selected component (if applicable):
Satellite 6.9.5 or earlier
How reproducible:
Reproducible via web or hammer cli
Steps to Reproduce:
1. Create a product
[root@satellite ~]# hammer product create --organization-id 1 --name "OSP16.1 Containers"
Product created.
[root@satellite ~]#
2. Attempt to create repository using donwload-policy:
[root@satellite ~]# hammer repository create \
> --name base \
> --organization-id 1 \
> --product "OSP16.1 Containers" \
> --content-type docker \
> --url https://registry.redhat.io \
> --docker-upstream-name rhosp-rhel8/openstack-base \
> --upstream-username $USERNAME \
> --upstream-password $PASSWORD \
> --download-policy on_demand
Could not create the repository:
Validation failed: Download policy Cannot set attribute download_policy for content type docker
[root@satellite ~]#
Actual results:
Can not use download_policy "on_demand" for content type "docker"
Expected results:
Can use download_policy "on_demand" for content type "docker"
Comment 1Tanya Tereshchenko
2021-09-06 19:18:03 UTC
This is supported in Pulp 3 upstream, needs to be exposed on the Katello side.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2022:8506
Description of problem: When creating a repository of content_type docker, it is not possible to define download_policy to "on_demand", as it is the case and correctly documented for the content_type yum: [root@satellite ~]# hammer repository update --help |grep -A1 download-policy --download-policy DOWNLOAD_POLICY Download policy for yum repos (either 'immediate', 'on_demand', or 'background (deprecated)') Example on one single repository, in which the initial sync downloaded all blobs: [root@satellite ~]# du -sk /var/lib/pulp ; hammer repository sync --id 16 --organization-id 1 ; du -sk /var/lib/pulp 3147168 /var/lib/pulp [....................................................................................................................] [100%] New blobs: 924. 9165392 /var/lib/pulp [root@satellite ~]# That's roughly 5.7GB used by one single container, out of 117 different ones required by RHOSP 16.1. The downloaded tags include not only older versions that will never be used, but also others with tags such as *-source. Being able to download images as they are pulled would save a lot of space (> 100GB on the initial sync of RHOSP 16.1) and also make the initial sync way faster. Only when an image is being pulled from satellite, the required blobs would be downloaded, depending on the tag specified as part of the pull. Version-Release number of selected component (if applicable): Satellite 6.9.5 or earlier How reproducible: Reproducible via web or hammer cli Steps to Reproduce: 1. Create a product [root@satellite ~]# hammer product create --organization-id 1 --name "OSP16.1 Containers" Product created. [root@satellite ~]# 2. Attempt to create repository using donwload-policy: [root@satellite ~]# hammer repository create \ > --name base \ > --organization-id 1 \ > --product "OSP16.1 Containers" \ > --content-type docker \ > --url https://registry.redhat.io \ > --docker-upstream-name rhosp-rhel8/openstack-base \ > --upstream-username $USERNAME \ > --upstream-password $PASSWORD \ > --download-policy on_demand Could not create the repository: Validation failed: Download policy Cannot set attribute download_policy for content type docker [root@satellite ~]# Actual results: Can not use download_policy "on_demand" for content type "docker" Expected results: Can use download_policy "on_demand" for content type "docker"