Hi,

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 [email protected] -XPOST "
https://127.0.0.1/pulp/api/v2/consumers/content/applicability/";| jq .
[
  {
    "applicability": {
      "erratum": [
        "cc087b1e-13df-490f-b2c3-fb10770559b4",
        "ab79825d-60f4-449f-a3a0-14b628468df3",
...
        "0101b5b8-bac1-405e-a06c-703a0a6f6849",
...


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

curl -qsk --cert $HOME/.pulp/user-cert.pem -XGET "
https://127.0.0.1/pulp/api/v2/content/units/erratum/0101b5b8-bac1-405e-a06c-703a0a6f6849/
"
"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 [email protected] -XPOST "
https://127.0.0.1/pulp/api/v2/repositories/actions/content/regenerate_applicability/
"

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?

Thanks,
Grant
_______________________________________________
Pulp-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pulp-list

Reply via email to