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.

Bug 2246550

Summary: Capsule slowdown from 10 minutes to 2 hours
Product: Red Hat Satellite Reporter: Odilon Sousa <osousa>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: visawant
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.13.5CC: dalley, dkliban, ggainey, osousa, rchan, visawant, vsedmik
Target Milestone: 6.13.6Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-pulpcore-3.21.18-2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2245930 Environment:
Last Closed: 2023-11-21 21:27:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 visawant 2023-11-03 14:59:46 UTC
Verified

Version tested: Satellite 6.13.6 Snap 1.0

Steps performed:
----------------

Step 1 - Add below 8 repositories and Sync all of them.

RHEL 8 and RHEL 9 (appstream & baseos) so there are 4 repos
Satellite 6 Client, 
Satellite 6.13 maintenance, 
Satellite 6.13 RPMs, 
Upstream Foreman repository. (Create custom product for upstream foreman repo) 
That makes 8 repositories total.


Step 2 - Go to setting, content tab and set below settings to No

"Sync Capsules after content view promotion" => No


Step 3 - Create CV's with names => RHEL-8 and RHEL-9

In RHEL-8 CV add rhel-8 and the 3 satellite repositories, RHEL 8 CV has 2 versions, with 4 LCEs promoted between the 2 of them
In RHEL-9 CV add rhel-9 and the 3 satellite repositories, RHEL 9 CV has 2 versions with 4 LCEs promoted between the 2 of them


Step 4 - On Satellite terminal, Edit "~/.config/pulp/cli.toml" file and add profile for capsule

[root@ip-satellite-fqdn ~]# cat ~/.config/pulp/cli.toml 
[cli-capsule]
base_url = "https://<capsule-fqdn>"
cert = "/etc/foreman/client_cert.pem"
key = "/etc/foreman/client_key.pem"


Step 5 - Go to Infrastructure > Capsule, Edit capsule then go to Lifecycle Environments tab, add all 4 LCE to selected items and hit submit.


Step 6 - Now go to Capsule Overview, Click Complete Sync, wait till sync get finish.


Step 7 - On Satellite terminal,  list out tasks related to capsule synchronize

# hammer task list | grep 'Synchronize capsule'

[root@satellite-fqdn ~]# hammer task list | grep 'Synchronize capsule'
debd61b1-b7d8-46d0-a23d-b2da4c62e40a | Synchronize capsule '<capsule-fqdn>'           | running   | pending | 2023/11/03 11:45:20 |                     | 10.245431   | admin             |                                                                                 

[root@satellite-fqdn ~]# hammer task list | grep 'Synchronize capsule'
debd61b1-b7d8-46d0-a23d-b2da4c62e40a | Synchronize capsule '<capsule-fqdn>'           | running   | pending | 2023/11/03 11:45:20 |                     | 589.973763  | admin             |                                                                                 

[root@satellite-fqdn ~]# hammer task list | grep 'Synchronize capsule'
debd61b1-b7d8-46d0-a23d-b2da4c62e40a | Synchronize capsule '<capsule-fqdn>'           | stopped   | success | 2023/11/03 11:45:20 | 2023/11/03 11:55:45 | 624.557387  | admin             |                                                                                 


Step 8 - Run pulp command to check the number of repositories synced

# pulp --profile capsule rpm repository list --limit 1
[root@satellite-fqdn ~]#  pulp --profile capsule rpm repository list --limit 1
Not all 48 entries were shown.
[
  {
    "pulp_href": "/pulp/api/v3/repositories/rpm/rpm/b194c2d5-f5be-4a2d-9458-7b3e256f0adb/",
    "pulp_created": "2023-11-03T11:45:32.233939Z",
    "versions_href": "/pulp/api/v3/repositories/rpm/rpm/b194c2d5-f5be-4a2d-9458-7b3e256f0adb/versions/",
    "pulp_labels": {},
    "latest_version_href": "/pulp/api/v3/repositories/rpm/rpm/b194c2d5-f5be-4a2d-9458-7b3e256f0adb/versions/1/",
    "name": "473e6cf4-7de4-4ab6-850b-70babefad664",
    "description": null,
    "retain_repo_versions": null,
    "remote": null,
    "autopublish": false,
    "metadata_signing_service": null,
    "retain_package_versions": 0,
    "metadata_checksum_type": null,
    "package_checksum_type": null,
    "gpgcheck": 0,
    "repo_gpgcheck": 0,
    "sqlite_metadata": false
  }
]

Step 9 - Run below commands on capsule to get count of artifacts and disk usage
[root@capsule-fqdn ~]# du -s /var/lib/pulp/media/artifact/
451956	/var/lib/pulp/media/artifact/
[root@capsule-fqdn ~]# du -s /var/lib/pulp/media/artifact/ -h
442M	/var/lib/pulp/media/artifact/

Comment 8 errata-xmlrpc 2023-11-21 21:27:34 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 (Satellite 6.13.6 Async Update), 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/RHBA-2023:7461