[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] Content applicability orphaned units

In case it helps anyone. Remove the culprit[s] from the mongo database directly.

"No content unit resource: c2f90e67-b9e7-4450-9aad-5f867b0ab157"

> db.repo_profile_applicability.remove({ "applicability.erratum": "c2f90e67-b9e7-4450-9aad-5f867b0ab157" })
WriteResult({ "nRemoved" : 1 })

This appears to have resolved my issue without any negative impact.


On Thu, 30 May 2019 at 13:59, Grant Byers <grant byers gmail com> wrote:

I've been working on an errata import tool. During this process, I've had the occasional need to remove existing errata and cleanup orphaned content;

pulp-admin rpm repo remove errata --repo-id=$repo_id --match="id=.*"
pulp-admin orphan remove --type erratum

But now I have a situation where applicability reports for some consumers return erratum IDs that no longer exist. ie.

curl -qsk --cert $HOME/.pulp/user-cert.pem -d data json -XPOST ""| jq .
    "applicability": {
      "erratum": [

However, if I try to retrieve those content units, some don't exist ;

curl -qsk --cert $HOME/.pulp/user-cert.pem -XGET ""
"No content unit resource: 0101b5b8-bac1-405e-a06c-703a0a6f6849"

I've tried removing all orphans and regenerating repository and consumer content applicability with limited success. ie.

pulp-admin orphan remove --all
curl -qsk --cert $HOME/.pulp/user-cert.pem -d repo json -XPOST ""

Where data.json contains the following (to match all repos we import erratum to);
     "repo_criteria": {
           "filters": {"id": {"$regex": "/^centos[67].*-(os|updates|extras|epel)/"}}
     "parallel": true

Restarting goferd on affected agents, then running content applicability regeneration for all consumers. This did seem to work for one consumer, but not for others.

How can I clean up these applicability orphans?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]