[Pulp-list] Content applicability orphaned units

Grant Byers grant.byers at gmail.com
Mon Jun 17 23:58:38 UTC 2019


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.

Grant

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

> 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 -d at data.json -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 -d at repo.json -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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20190618/af6bf033/attachment.htm>


More information about the Pulp-list mailing list