Hello @iballou
When I saw that error i though exactly the same.
Unfortunately after running
$ foreman-maintain content remove-pulp2
$ su - postgres -c 'psql pulpcore -c "\dt pulp_2to3_migration_*"'
Which deleted all the old tables, we still got the same error.
Jul 19 18:17:40 updates pulpcore-api: pulp [29a4aa8b574f485ebe72425ebb6505c5]: - - [19/Jul/2022:17:17:40 +0000] "POST /pulp/api/v3/orphans/cleanup/ HTTP/1.1" 202 67 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:40 updates pulpcore-worker-3: pulp [52be108736154bedbd8a6c7e9f7bb869]: pulpcore.tasking.pulpcore_worker:INFO: Starting task 898f459f-1f48-40f7-ae07-a650acd3f822
Jul 19 18:17:40 updates pulpcore-worker-3: pulp [52be108736154bedbd8a6c7e9f7bb869]: pulpcore.app.tasks.repository:INFO: Deleting and squashing version 2 of repository 'CentOS_8-CentOS_8_AppStream_RPMS'
Jul 19 18:17:40 updates pulpcore-api: pulp [c9c9b400da7943c0b38db926cea6773e]: - - [19/Jul/2022:17:17:40 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 428 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:40 updates pulpcore-worker-6: pulp [29a4aa8b574f485ebe72425ebb6505c5]: pulpcore.tasking.pulpcore_worker:INFO: Starting task 18ddd0f4-eb2c-4bd1-82b1-5125bd049f95
Jul 19 18:17:40 updates pulpcore-api: pulp [4e03488667314c129be3c18a250e230a]: - - [19/Jul/2022:17:17:40 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 509 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:41 updates pulpcore-api: pulp [2cfd5424ccad4833adb84670fdb9e4ab]: - - [19/Jul/2022:17:17:41 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 627 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:42 updates pulpcore-api: pulp [1620a0dfb4b24d58b4cf85103a57b404]: - - [19/Jul/2022:17:17:42 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 627 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:42 updates pulpcore-api: pulp [1515242e99874bb7980821c7146e501b]: - - [19/Jul/2022:17:17:42 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 627 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:43 updates pulpcore-api: pulp [3c23353536d2450d8870a68f67cbfc01]: - - [19/Jul/2022:17:17:43 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 630 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:43 updates pulpcore-worker-3: pulp [52be108736154bedbd8a6c7e9f7bb869]: pulpcore.tasking.pulpcore_worker:INFO: Task completed 898f459f-1f48-40f7-ae07-a650acd3f822
Jul 19 18:17:44 updates pulpcore-api: pulp [caef3342474844299fb4d656367cf1c4]: - - [19/Jul/2022:17:17:44 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 630 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:45 updates pulpcore-api: pulp [f06c22189fd143169b59c55a912593b2]: - - [19/Jul/2022:17:17:45 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 630 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:46 updates pulpcore-api: pulp [bbb926c590b64d5f98834ba707ef8813]: - - [19/Jul/2022:17:17:46 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 630 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:47 updates pulpcore-api: pulp [1aa4c51b1e504c4c9cf9e723b48875aa]: - - [19/Jul/2022:17:17:47 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 630 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:49 updates pulpcore-api: pulp [5a5d39397dac4db181498e2683e98a6d]: - - [19/Jul/2022:17:17:49 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 630 "-" "OpenAPI-Generator/3.16.7/ruby"
Jul 19 18:17:50 updates pulpcore-worker-6: pulp [29a4aa8b574f485ebe72425ebb6505c5]: pulpcore.tasking.pulpcore_worker:INFO: Task 18ddd0f4-eb2c-4bd1-82b1-5125bd049f95 failed (Repository matching query does not exist.)
Jul 19 18:17:50 updates pulpcore-worker-6: pulp [29a4aa8b574f485ebe72425ebb6505c5]: pulpcore.tasking.pulpcore_worker:INFO: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulpcore/tasking/pulpcore_worker.py", line 380, in _perform_task
Jul 19 18:17:50 updates pulpcore-worker-6: result = func(*args, **kwargs)
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulpcore/app/tasks/orphan.py", line 66, in orphan_cleanup
Jul 19 18:17:50 updates pulpcore-worker-6: c.delete()
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/query.py", line 746, in delete
Jul 19 18:17:50 updates pulpcore-worker-6: deleted, _rows_count = collector.delete()
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/deletion.py", line 435, in delete
Jul 19 18:17:50 updates pulpcore-worker-6: signals.post_delete.send(
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 180, in send
Jul 19 18:17:50 updates pulpcore-worker-6: return [
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 181, in <listcomp>
Jul 19 18:17:50 updates pulpcore-worker-6: (receiver, receiver(signal=self, sender=sender, **named))
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulp_rpm/app/models/distribution.py", line 340, in cleanup_subrepos
Jul 19 18:17:50 updates pulpcore-worker-6: Variant.objects.filter(repository=subrepo).delete()
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/query.py", line 746, in delete
Jul 19 18:17:50 updates pulpcore-worker-6: deleted, _rows_count = collector.delete()
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/deletion.py", line 435, in delete
Jul 19 18:17:50 updates pulpcore-worker-6: signals.post_delete.send(
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 180, in send
Jul 19 18:17:50 updates pulpcore-worker-6: return [
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 181, in <listcomp>
Jul 19 18:17:50 updates pulpcore-worker-6: (receiver, receiver(signal=self, sender=sender, **named))
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulp_rpm/app/models/distribution.py", line 338, in cleanup_subrepos
Jul 19 18:17:50 updates pulpcore-worker-6: subrepo = instance.repository
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/fields/related_descriptors.py", line 187, in __get__
Jul 19 18:17:50 updates pulpcore-worker-6: rel_obj = self.get_object(instance)
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/fields/related_descriptors.py", line 154, in get_object
Jul 19 18:17:50 updates pulpcore-worker-6: return qs.get(self.field.get_reverse_related_filter(instance))
Jul 19 18:17:50 updates pulpcore-worker-6: File "/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/query.py", line 435, in get
Jul 19 18:17:50 updates pulpcore-worker-6: raise self.model.DoesNotExist(
Jul 19 18:17:51 updates pulpcore-api: pulp [4fd22c711ce248d1a5348a0e393a4f8f]: - - [19/Jul/2022:17:17:51 +0000] "GET /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/ HTTP/1.1" 200 3335 "-" "OpenAPI-Generator/3.16.7/ruby"
$ hammer --no-headers --output json task list --order 'started_at DESC' --search 'state = "paused" '
[
{
"ID": "9057c237-d82c-410b-af81-701f917b7e16",
"Action": "Remove orphans ",
"State": "paused",
"Result": "error",
"Started at": "2022-07-19 17:16:58 UTC",
"Ended at": null,
"Duration": "00:01:41.365808",
"Owner": "foreman_admin",
"Task errors": [
"Repository matching query does not exist."
]
}
]
# http_pulp /pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/
HTTP/1.1 200 OK
Access-Control-Expose-Headers: Correlation-ID
Allow: GET, PATCH, DELETE, HEAD, OPTIONS
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 943
Content-Type: application/json
Correlation-ID: 4ca178df822b496a96a30bc5c3864909
Date: Tue, 19 Jul 2022 17:20:25 GMT
Keep-Alive: timeout=15, max=100
Referrer-Policy: same-origin
Server: gunicorn
Vary: Accept,Cookie,Accept-Encoding
Via: 1.1 updates.example.com
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
{
"child_tasks": [],
"created_resources": [],
"error": {
"description": "Repository matching query does not exist.",
"traceback": " File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulpcore/tasking/pulpcore_worker.py\", line 380, in _perform_task\n result = func(*args, **kwargs)\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulpcore/app/tasks/orphan.py\", line 66, in orphan_cleanup\n c.delete()\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/query.py\", line 746, in delete\n deleted, _rows_count = collector.delete()\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/deletion.py\", line 435, in delete\n signals.post_delete.send(\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/dispatch/dispatcher.py\", line 180, in send\n return [\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/dispatch/dispatcher.py\", line 181, in <listcomp>\n (receiver, receiver(signal=self, sender=sender, **named))\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulp_rpm/app/models/distribution.py\", line 340, in cleanup_subrepos\n Variant.objects.filter(repository=subrepo).delete()\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/query.py\", line 746, in delete\n deleted, _rows_count = collector.delete()\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/deletion.py\", line 435, in delete\n signals.post_delete.send(\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/dispatch/dispatcher.py\", line 180, in send\n return [\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/dispatch/dispatcher.py\", line 181, in <listcomp>\n (receiver, receiver(signal=self, sender=sender, **named))\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulp_rpm/app/models/distribution.py\", line 338, in cleanup_subrepos\n subrepo = instance.repository\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/fields/related_descriptors.py\", line 187, in __get__\n rel_obj = self.get_object(instance)\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/fields/related_descriptors.py\", line 154, in get_object\n return qs.get(self.field.get_reverse_related_filter(instance))\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/django/db/models/query.py\", line 435, in get\n raise self.model.DoesNotExist(\n"
},
"finished_at": "2022-07-19T17:17:50.928953Z",
"logging_cid": "29a4aa8b574f485ebe72425ebb6505c5",
"name": "pulpcore.app.tasks.orphan.orphan_cleanup",
"parent_task": null,
"progress_reports": [
{
"code": "clean-up.content",
"done": 2000,
"message": "Clean up orphan Content",
"state": "running",
"suffix": null,
"total": 15379
}
],
"pulp_created": "2022-07-19T17:17:40.032014Z",
"pulp_href": "/pulp/api/v3/tasks/18ddd0f4-eb2c-4bd1-82b1-5125bd049f95/",
"reserved_resources_record": [],
"started_at": "2022-07-19T17:17:40.292569Z",
"state": "failed",
"task_group": null,
"worker": "/pulp/api/v3/workers/38481210-0d06-4c37-96b2-20d50e237b6a/"
}