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.
Bug 2001517 - [RFE] Allow "on_demand" download policy for repositories of content_type docker
Summary: [RFE] Allow "on_demand" download policy for repositories of content_type docker
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.9.0
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: 6.12.0
Assignee: Ryan Verdile
QA Contact: Cole Higgins
URL:
Whiteboard:
: 1504789 1772887 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-06 09:27 UTC by Eric Nothen
Modified: 2023-09-07 23:20 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:32:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34217 0 Normal Closed Allow "on_demand" download policy for repositories of content_type docker 2022-03-23 19:00:44 UTC
Red Hat Issue Tracker SAT-4918 0 None None None 2021-09-08 12:11:07 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:33:34 UTC

Description Eric Nothen 2021-09-06 09:27:31 UTC
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 1 Tanya Tereshchenko 2021-09-06 19:18:03 UTC
This is supported in Pulp 3 upstream, needs to be exposed on the Katello side.

Comment 2 Robin Chan 2022-03-23 18:50:45 UTC
@rverdile should this issue https://projects.theforeman.org/issues/34217 be linked to this bz?

Comment 3 Ryan Verdile 2022-03-23 19:00:44 UTC
Connecting redmine issue https://projects.theforeman.org/issues/34217 from this bug

Comment 4 Ryan Verdile 2022-03-23 19:01:35 UTC
(In reply to Robin Chan from comment #2)
> @rverdile should this issue
> https://projects.theforeman.org/issues/34217 be linked to this bz?

Yes, thank you. Should be linked now.

Comment 5 Bryan Kearney 2022-03-23 20:04:27 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34217 has been resolved.

Comment 6 Eric Nothen 2022-05-25 15:09:53 UTC
Hello everyone, I don't see a target milestone for this BZ. Can some tell on which version of Satellite this feature is expected to be released?

Comment 14 errata-xmlrpc 2022-11-16 13:32:46 UTC
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

Comment 16 Andy Stillman 2023-02-21 02:41:12 UTC
*** Bug 1772887 has been marked as a duplicate of this bug. ***

Comment 17 Ian Ballou 2023-05-22 15:18:47 UTC
*** Bug 1504789 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.