Bug 1957464 - Foreman Task: Remove Orphans, results in pulp3 errors
Summary: Foreman Task: Remove Orphans, results in pulp3 errors
Keywords:
Status: CLOSED DUPLICATE of bug 1959640
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.9.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Tasos Papaioannou
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-05 19:58 UTC by Jason Dickerson
Modified: 2021-05-20 15:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-20 15:38:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
prodution log errors (128.52 KB, text/plain)
2021-05-05 19:58 UTC, Jason Dickerson
no flags Details

Description Jason Dickerson 2021-05-05 19:58:14 UTC
Created attachment 1779963 [details]
prodution log errors

Description of problem:
Remove Orphans Task encounters pulp3 Service down error

Version-Release number of selected component (if applicable):
6.9.1 (upgraded from 6.8.3, had to re-run installer multiple times due to errors caused by /tmp/bundler)

How reproducible:
consistently

Steps to Reproduce:
1.  Run: foreman-rake katello:delete_orphaned_content RAILS_ENV=production
2.  Find Orphan Remove task in the Task list in Satellite


Actual results:
Error:  

There was an issue with the backend service pulp3: 503 Service Unavailable
There was an issue with the backend service pulp3: 503 Service Unavailable
There was an issue with the backend service pulp3: 503 Service Unavailable

Expected results:
Job runs

Additional info:
Attaching production.log errors

Comment 1 Jason Dickerson 2021-05-05 21:52:21 UTC
pulp3 references in the production log entries attached.  

$ grep pulp3 production_log_RemoveOrphans_error.txt 
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/app/models/katello/ping.rb:185:in `pulp3_without_auth'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/app/models/katello/ping.rb:75:in `block in ping_pulp3_without_auth'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/app/models/katello/ping.rb:74:in `ping_pulp3_without_auth'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb:9:in `block in plan'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb:8:in `plan'
2021-05-05T14:39:24 [E|bac|] There was an issue with the backend service pulp3: 503 Service Unavailable (RuntimeError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb:9:in `block in plan'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb:8:in `plan'
2021-05-05T14:39:24 [E|bac|] There was an issue with the backend service pulp3: 503 Service Unavailable (RuntimeError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb:9:in `block in plan'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb:8:in `plan'
2021-05-05T14:39:24 [E|bac|] There was an issue with the backend service pulp3: 503 Service Unavailable (RuntimeError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb:9:in `block in plan'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.27/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb:8:in `plan'
2021-05-05T14:39:25 [E|app|] Smart proxy with ID 1 may be down: There was an issue with the backend service pulp3: 503 Service Unavailable

katello ping is attempting to ping the pulp3 api.  Notice:  

$ systemctl list-unit-files
...
pulp_celerybeat.service                       enabled 
pulp_resource_manager.service                 enabled 
pulp_streamer.service                         enabled 
pulp_worker-0.service                         static  
pulp_worker-1.service                         static  
pulp_worker-2.service                         static  
pulp_worker-3.service                         static  
pulp_workers.service                          enabled 
pulpcore-api.service                          disabled
pulpcore-content.service                      disabled
pulpcore-resource-manager.service             disabled
pulpcore-worker@.service                      disabled
...

I believe the intent is that pulp3 is at least partly installed in preparation for migration activities, but no code in katello should be referencing it as yet.  Unfortunately, it seems some pulp3 code slipped into katello.  I have not noticed anything else affected so far, other than this code.

Comment 2 Jason Dickerson 2021-05-05 21:54:44 UTC
You can work around the issue by running 

pulp-admin orphan remove --all --bg

on the satellite and each capsule, instead of using the foreman-rake command in cron.d/katello on the satellite.

Comment 3 Brad Buckingham 2021-05-12 20:50:55 UTC
Not certain the appropriate component for this rake task; however, Repositories may be a better fit.

Comment 4 Brad Buckingham 2021-05-12 20:52:02 UTC
Solution for this one may be same as for bug 1959640.

Comment 5 Ian Ballou 2021-05-20 15:38:24 UTC
Closing this as a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1959640.  Please reopen this bug if the fix for that issue doesn't resolve the issue here.

*** This bug has been marked as a duplicate of bug 1959640 ***


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