<div dir="ltr"><div>Hi,</div><div><br></div><div>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;</div><div><br></div><div>pulp-admin rpm repo remove errata --repo-id=$repo_id --match="id=.*"</div><div>pulp-admin orphan remove --type erratum</div><div><br></div><div>But now I have a situation where applicability reports for some consumers return erratum IDs that no longer exist. ie.</div><div><br></div><div>curl -qsk --cert $HOME/.pulp/user-cert.pem -d@data.json -XPOST "<a href="https://127.0.0.1/pulp/api/v2/consumers/content/applicability/">https://127.0.0.1/pulp/api/v2/consumers/content/applicability/</a>"| jq .</div><div></div><div>[<br>  {<br>    "applicability": {<br>      "erratum": [<br>        "cc087b1e-13df-490f-b2c3-fb10770559b4",<br>        "ab79825d-60f4-449f-a3a0-14b628468df3",</div><div>...</div><div>        "0101b5b8-bac1-405e-a06c-703a0a6f6849",</div><div>...</div><div><br></div><div><br></div><div>However, if I try to retrieve those content units, some don't exist ;</div><div><br></div><div>curl -qsk --cert $HOME/.pulp/user-cert.pem -XGET "<a href="https://127.0.0.1/pulp/api/v2/content/units/erratum/0101b5b8-bac1-405e-a06c-703a0a6f6849/">https://127.0.0.1/pulp/api/v2/content/units/erratum/0101b5b8-bac1-405e-a06c-703a0a6f6849/</a>"<br>"No content unit resource: 0101b5b8-bac1-405e-a06c-703a0a6f6849"</div><div><br></div><div>I've tried removing all orphans and regenerating repository and consumer content applicability with limited success. ie.<br></div><div><br></div><div>pulp-admin orphan remove --all</div><div>curl -qsk --cert $HOME/.pulp/user-cert.pem -d@repo.json -XPOST "<a href="https://127.0.0.1/pulp/api/v2/repositories/actions/content/regenerate_applicability/">https://127.0.0.1/pulp/api/v2/repositories/actions/content/regenerate_applicability/</a>"</div><div><br></div><div>Where data.json contains the following (to match all repos we import erratum to);<br></div><div>{<br>     "repo_criteria": {<br>           "filters": {"id": {"$regex": "/^centos[67].*-(os|updates|extras|epel)/"}}<br>     },<br>     "parallel": true<br>}</div><div><br></div><div>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.</div><div><br></div><div><br></div><div>How can I clean up these applicability orphans?</div><div><br></div><div>Thanks,</div><div>Grant</div><div><br></div><div><br></div><div><br></div></div>