Red Hat Bugzilla – Bug 1002807
Pulp sync not removing RPMs that no longer exist at origin.
Last modified: 2013-09-09 12:38:08 EDT
Description of problem:
When an RPM is removed from the origin server a subsequent repo sync within Pulp fails to remove the RPM from the repository.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Sync a repo with an origin feed
2. Delete an RPM from origin repo
3. Sync repo within pulp
Deleted RPM still exists.
RPM deleted from source is deleted from pulp as well.
I believe this was working in earlier versions of version 2. I'm also getting a slew of errors - like the one below - in the logs. I believe this is a recent development and may or may not be related.
2013-08-30 04:24:38,415 pulp.plugins.pulp_rpm.yum_plugin.util:WARNING: Removing </var/lib/pulp/working/repos/mobi-snapshot/distributors/yum_distributor/super-pom-war-2.0.8-
263255.SNAPSHOT.noarch.rpm> since it was pointing to </var/lib/pulp/content/rpm/super-pom-war/2.0.8/263255.SNAPSHOT/noarch/6560e813f0de33885db45b288c29adf4334a6cc6/s
uper-pom-war-2.0.8-263255.SNAPSHOT.noarch.rpm> and not </var/lib/pulp/content/rpm/super-pom-war/2.0.8/263255.SNAPSHOT/noarch/72a5546023be1c4a1b86b1b33897e494cdf99620/super-pom-war-2.0.8-263255.SNAPSHOT.noarch.rpm>
Have you tried using the "remove-missing" setting?
Here is an excerpt from the "pulp-admin rpm repo create --help". Both of these may be related to what you want.
Repository Contents Behavior
--remove-missing - if "true", units that were previously in the external
feed but are no longer found will be removed from the
repository; defaults to false
--retain-old-count - count indicating how many non-latest versions of a unit
to keep in a repository
I did not in fact know about this new option. However, upon setting the repos to true for --remove-missing and performing a repo sync and publish the packages are still within pulp but not the origin.
NM, performing a restart of apache then a sync/publish removed the packages. Thanks Michael, as always! ;)