Project

General

Profile

Actions

Bug #21414

open

Index content does not clean up units the got deleted in pulp

Added by Partha Aji over 6 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Repositories
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The import_all call for db units does not delete units that got wiped out in Pulp. Using SRPMs as example here but this is true of any unit type RPM, PackageGroups, Errata etc

  • Sync a source rpm repo (I synced https://dl.fedoraproject.org/pub/epel/7/SRPMS/ but any repo will do.. Counts will be different)
  • Delete that repo via UI
  • Now in the rails console try this test
    > ::Katello::RepositorySrpm.count
    => 0  # Good! no repos with srpms
    > ::Katello::Srpm.count
    => 3842 # I guess I needed to run clean up orphans
    
  • Run the the clean up
    $ rake katello:delete_orphan_content
    .....
    
  • get back to rails console
    > ::Katello::Srpm.import_all
    => ....... 1 rest call later which tells me there are no srpms
    
    > ::Katello::Srpm.count
    => 3842
    # Tells me SRPM count is not getting changed even if upstream pulp says there no source rpms
    ```
    I also know pulp srpm is clear here because I checked in mongo
    ```
    $ mongo pulp_database
    > db.units_rpm.count()
    8636
    
    > db.units_srpm.count()
    0
    

So if the indexing operation worked correctly we should have 0 Srpms.


Related issues 1 (0 open1 closed)

Related to Katello - Bug #21415: orphaned content units are not cleaned up from the databaseDuplicate10/20/2017Actions
Actions #1

Updated by Justin Sherrill over 6 years ago

  • Related to Bug #21415: orphaned content units are not cleaned up from the database added
Actions #2

Updated by Justin Sherrill over 6 years ago

  • translation missing: en.field_release set to 114
Actions

Also available in: Atom PDF