reported in https://community.theforeman.org/t/remove-orphan-fails/30807 when i run manually foreman-rake katello:delete_orphaned_content RAILS_ENV=production i see 2 tasks getting created the first run is fine the second one fails with the error: undefined method `all?’ for :_created:Symbol “/usr/share/gems/gems/pulp_rpm_client-3.17.12/lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb:146:in `list_with_http_info’” “/usr/share/gems/gems/pulp_rpm_client-3.17.12/lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb:109:in `list’” “/usr/share/gems/gems/katello-4.6.0/app/services/katello/pulp3/api/core.rb:194:in `block in versions_list_for_repository’” “/usr/share/gems/gems/katello-4.6.0/app/services/katello/pulp3/api/core.rb:245:in `block in fetch_from_list’” “/usr/share/gems/gems/katello-4.6.0/app/services/katello/pulp3/api/core.rb:240:in `loop’” “/usr/share/gems/gems/katello-4.6.0/app/services/katello/pulp3/api/core.rb:240:in `fetch_from_list’” “/usr/share/gems/gems/katello-4.6.0/app/services/katello/pulp3/api/core.rb:194:in `versions_list_for_repository’” “/usr/share/gems/gems/katello-4.6.0/app/services/katello/pulp3/smart_proxy_mirror_repository.rb:29:in `block (2 levels) in orphan_repository_versions’” “/usr/share/gems/gems/katello-4.6.0/app/services/katello/pulp3/smart_proxy_mirror_repository.rb:28:in `collect’” “/usr/share/gems/gems/katello-4.6.0/app/services/katello/pulp3/smart_proxy_mirror_repository.rb:28:in `block in orphan_repository_versions’” “/usr/share/gems/gems/katello-4.6.0/app/services/katello/pulp3/smart_proxy_mirror_repository.rb:25:in `each’” “/usr/share/gems/gems/katello-4.6.0/app/services/katello/pulp3/smart_proxy_mirror_repository.rb:25:in `orphan_repository_versions’” “/usr/share/gems/gems/katello-4.6.0/app/services/katello/pulp3/smart_proxy_repository.rb:39:in `delete_orphan_repository_versions’” “/usr/share/gems/gems/katello-4.6.0/app/lib/actions/pulp3/orphan_cleanup/delete_orphan_repository_versions.rb:10:in `run’” .....
Created from redmine issue https://projects.theforeman.org/issues/35657
Upstream bug assigned to None
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35657 has been resolved.
Verified in 6.13.0 snap 8.0 (rubygem-katello-4.7.0.5-1.el8sat.noarch) Steps: 1) Create repos of all types (AC, files, docker, custom rpm, RH rpm, KS), sync to Capsules in Library LCE. 2) Move the Capsules to another LCE and resync them. 3) Run the orphan cleanup and check the results: [root@sat ~]# foreman-rake katello:delete_orphaned_content RAILS_ENV=production Orphaned content deletion started in background. Orphaned content deletion started in background. Orphaned content deletion started in background. [root@sat ~]# [root@sat ~]# hammer task list --search "orphans" -------------------------------------|-----------------|---------|---------|---------------------|---------------------|-----------|---------------|------------ ID | ACTION | STATE | RESULT | STARTED AT | ENDED AT | DURATION | OWNER | TASK ERRORS -------------------------------------|-----------------|---------|---------|---------------------|---------------------|-----------|---------------|------------ 11deac93-6346-45ea-953b-85930cde29ad | Remove orphans | stopped | success | 2023/02/07 13:43:17 | 2023/02/07 13:43:39 | 22.08375 | foreman_admin | 36f926fd-0c90-4138-aea7-12a5afd4c710 | Remove orphans | stopped | success | 2023/02/07 13:43:16 | 2023/02/07 13:43:32 | 15.417211 | foreman_admin | 90537944-60f3-410d-8503-8864a0f8391c | Remove orphans | stopped | success | 2023/02/07 13:43:16 | 2023/02/07 13:43:20 | 3.648096 | foreman_admin | -------------------------------------|-----------------|---------|---------|---------------------|---------------------|-----------|---------------|------------
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.13 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-2023:2097