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 1979473

Summary: pulp2 cleanup failed due to dependency issue
Product: Red Hat Satellite Reporter: Devendra Singh <desingh>
Component: Satellite MaintainAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Devendra Singh <desingh>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: apatel, ggainey, gtalreja, jsherril, kgaikwad
Target Milestone: 6.10.0Keywords: Regression, Triaged, UpgradeBlocker, Upgrades
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 13:48:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Devendra Singh 2021-07-06 07:14:40 UTC
Description of problem: After satellite upgrade, pulp2 cleanup command failed due to dependency issue


Version-Release number of selected component (if applicable):
6.10 snap7

How reproducible:
always

Steps to Reproduce:
1. Prepare the 6.9.z setup using the upgrade template.
2. Run the pre-migration steps before running the upgrade for 6.10 snap6.
3. Applied the patch for BZ#1967131
4. Pulp migration completed successfully.
5. Satellite upgrade completes successfully.
6. Run pulp2 cleanup but it gets failed due to dependencies issue.


# satellite-maintain content remove-pulp2
Running Remove Pulp2 and mongodb packages and data
================================================================================
Remove pulp2: 

WARNING: All pulp2 packages will be removed with the following commands:

# rpm -e pulp-docker-plugins  pulp-ostree-plugins  pulp-puppet-plugins  pulp-puppet-tools  pulp-rpm-plugins  pulp-selinux  pulp-server  python-bson  python-mongoengine  python-nectar  python-pulp-common  python-pulp-docker-common  python-pulp-integrity  python-pulp-oid_validation  python-pulp-ostree-common  python-pulp-puppet-common  python-pulp-repoauth  python-pulp-rpm-common  python-pulp-streamer  python-pymongo  python-pymongo-gridfs  python2-amqp  python2-billiard  python2-celery  python2-django  python2-kombu  python2-solv  python2-vine  pulp-katello
# yum remove rh-mongodb34-*

All pulp2 data will be removed.

# rm -rf /var/lib/pulp/published
# rm -rf /var/lib/pulp/content
# rm -rf /var/lib/pulp/importers
# rm -rf /var/lib/pulp/uploads
# rm -rf /var/lib/mongodb/

Do you want to proceed?, [y(yes), q(quit)] y
/ Removing pulp2 packages                                             [FAIL]    
Failed executing rpm -e pulp-docker-plugins  pulp-ostree-plugins  pulp-puppet-plugins  pulp-puppet-tools  pulp-rpm-plugins  pulp-selinux  pulp-server  python-bson  python-mongoengine  python-nectar  python-pulp-common  python-pulp-docker-common  python-pulp-integrity  python-pulp-oid_validation  python-pulp-ostree-common  python-pulp-puppet-common  python-pulp-repoauth  python-pulp-rpm-common  python-pulp-streamer  python-pymongo  python-pymongo-gridfs  python2-amqp  python2-billiard  python2-celery  python2-django  python2-kombu  python2-solv  python2-vine  pulp-katello, exit status 29:
 error: Failed dependencies:
	pulp-server is needed by (installed) pulp-maintenance-2.21.5.1-1.el7sat.noarch
--------------------------------------------------------------------------------
Scenario [Remove Pulp2 and mongodb packages and data] failed.

Actual results:
Pulp2 data removal command failed due to a dependency issue.

Expected results:
Pulp2 data cleanup command should work.

Additional info:

Comment 4 Bryan Kearney 2021-07-14 20:01:24 UTC
Upstream bug assigned to jsherril

Comment 5 Bryan Kearney 2021-07-14 20:01:27 UTC
Upstream bug assigned to jsherril

Comment 6 Bryan Kearney 2021-07-16 16:01:31 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32818 has been resolved.

Comment 7 Brad Buckingham 2021-07-23 20:20:57 UTC
This fix appears to be in Satellite 6.10 SNAP 10 with rubygem-foreman_maintain-0.8.7-1.el7sat.noarch; therefore, moving this bugzilla to ON_DEV for next handoff.

Comment 8 Devendra Singh 2021-08-12 14:36:41 UTC
Verified on 6.10.0 Snap 12

Verification points:

- Prepared the 6.9 setups for the upgrade.
- Ran the pulp migration and it was completed successfully.
- Ran the upgrade from 6.9.z to 6.10 Snap 12 and it was completed successfully.

 foreman-maintain upgrade run --whitelist="disk-performance" --target-version 6.10 -y
 Checking for new version of satellite-maintain...
 .................
 .................
 Running Procedures before migrating to Satellite 6.10
 .......................
 .......................
 ======================================================
 Migration of content from Pulp 2 to Pulp3 is complete
 After verifying accessibility of content from clients,
 it is strongly recommend to run "foreman-maintain content remove-pulp2"
 This will remove Pulp 2, MongoDB, and all pulp2 content in /var/lib/pulp/content/
 ======================================================                [32m[1m[OK][0m
 --------------------------------------------------------------------------------
 
 
 --------------------------------------------------------------------------------
 Upgrade finished.

- Ran pulp2 cleanup but it gets failed due to dependencies issue.

# satellite-maintain content remove-pulp2
Running Remove Pulp2 and mongodb packages and data
================================================================================
Remove pulp2: 

WARNING: All pulp2 packages will be removed with the following commands:

# rpm -e pulp-docker-plugins  pulp-ostree-plugins  pulp-puppet-plugins  pulp-puppet-tools  pulp-rpm-plugins  pulp-selinux  pulp-server  python-bson  python-mongoengine  python-nectar  python-pulp-common  python-pulp-docker-common  python-pulp-integrity  python-pulp-oid_validation  python-pulp-ostree-common  python-pulp-puppet-common  python-pulp-repoauth  python-pulp-rpm-common  python-pulp-streamer  python-pymongo  python-pymongo-gridfs  python2-amqp  python2-billiard  python2-celery  python2-django  python2-kombu  python2-solv  python2-vine  pulp-katello  pulp-maintenance  python3-pulp-2to3-migration
# yum remove rh-mongodb34-*
# yum remove squid mod_wsgi

All pulp2 data will be removed.

# rm -rf /var/lib/pulp/published
# rm -rf /var/lib/pulp/importers
# rm -rf /var/lib/pulp/uploads
# rm -rf /var/lib/mongodb/

Do you want to proceed?, [y(yes), q(quit)] y
- Removing pulp2 packages                                                       
| Removing mongo packages                                                       
\ Removing additional packages                                                  
/ Dropping migration tables                                                     
| Dropping migrations                                                           
- Done deleting pulp2 data directories                                [OK]      
--------------------------------------------------------------------------------


- Checked the fixed in-version

# rpm -qa|grep "rubygem-foreman_maint"
rubygem-foreman_maintain-0.8.10-1.el7sat.noarch

Comment 11 errata-xmlrpc 2021-11-16 13:48:19 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.10 Satellite Maintenance 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/RHBA-2021:4697