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 1994129

Summary: '/var/cache/pulp' directory in Satellite-6.10 is not removed by command "# satellite-maintain content remove-pulp2"
Product: Red Hat Satellite Reporter: Jayant Bhatia <jbhatia>
Component: Satellite MaintainAssignee: Amit Upadhye <aupadhye>
Status: CLOSED ERRATA QA Contact: Gaurav Talreja <gtalreja>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: apatel, aupadhye, kgaikwad, ttereshc, zhunting
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-0.8.18 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 Jayant Bhatia 2021-08-16 19:42:24 UTC
Description of problem:
Since '/var/lib/pulp/tmp' is used in Satellite-6.10 and '/var/cache/pulp' is not used, hence after Satellite-6.9 -> Satellite-6.10 upgrade, '/var/cache/pulp' directory should also be removed during pulp-2 packages and data cleanup.


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

Steps to Reproduce:
1. Upgrade Satellite-6.9 to Satellite-6.10.
2. Once the upgrade is completed, run "# satellite-maintain content remove-pulp2" command on Satellite-6.10.

Actual results: '/var/cache/pulp' is not removed


Expected results: '/var/cache/pulp' should get removed as it is used by pulp-2 and pulp-3 uses '/var/lib/pulp/tmp'.

Comment 1 Tanya Tereshchenko 2021-08-22 19:38:08 UTC
Pulp 2 removal is not implemented by Pulp.

Comment 3 Amit Upadhye 2021-09-28 18:03:37 UTC
Created redmine issue https://projects.theforeman.org/issues/33579 from this bug

Comment 4 Gaurav Talreja 2021-10-12 07:46:02 UTC
Verified.

Tested on Satellite 6.9.7 Snap 1.0
Version: rubygem-foreman_maintain-0.8.19-1.el7sat.noarch (From Satellite 6.10.0 Snap 22)

Steps:
1. # foreman-maintain upgrade run --target-version=6.10
2. # foreman-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/content
# rm -rf /var/lib/pulp/uploads
# rm -rf /var/lib/mongodb/
# rm -rf /var/cache/pulp

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]
--------------------------------------------------------------------------------

3. # ls /var/cache/pulp/
ls: cannot access /var/cache/pulp/: No such file or directory

Observation:
/var/cache/pulp/ is removed post-upgrade after Pulp2 removal, and /var/lib/pulp/tmp exists for Pulp3.

Comment 7 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