[ContentMigration] Database error deleting Content View

Problem:
When trying to delete a Content View (not just one of the versions, the whole thing), I get this error:

update or delete on table "core_publication" violates foreign key constraint "pulp_2to3_migration__pulp3_publication_id_221e8b1c_fk_core_publ" on table "pulp_2to3_migration_pulp2distributor"
DETAIL:  Key (pulp_id)=(3ca73e34-21a5-442a-afda-0ab4e0b5c1f8) is still referenced from table "pulp_2to3_migration_pulp2distributor".

Expected outcome:
Content View should delete successfully.

Foreman and Proxy versions:

$ rpm -qa | egrep '(foreman|tfm)'
tfm-rubygem-deep_cloneable-3.0.0-4.el7.noarch
tfm-rubygem-apipie-rails-0.5.17-4.el7.noarch
tfm-rubygem-ldap_fluff-0.6.0-1.el7.noarch
tfm-rubygem-hocon-1.3.1-2.el7.noarch
tfm-pulpcore-python3-six-1.16.0-1.el7.noarch
tfm-pulpcore-python3-multidict-5.2.0-1.el7.x86_64
tfm-rubygem-oauth-0.5.4-5.el7.noarch
tfm-pulpcore-python3-aiohttp-3.7.4-4.el7.x86_64
tfm-pulpcore-python3-pycodestyle-2.7.0-4.el7.noarch
tfm-rubygem-graphql-1.8.14-3.el7.noarch
tfm-rubygem-zest-0.0.4-2.el7.noarch
tfm-pulpcore-python3-createrepo_c-0.17.7-3.2.el7.x86_64
tfm-rubygem-xmlrpc-0.3.0-3.el7.noarch
tfm-pulpcore-python3-bleach-3.3.1-1.el7.noarch
tfm-pulpcore-python3-jsonschema-3.2.0-7.el7.noarch
tfm-rubygem-net-scp-1.2.1-5.el7.noarch
foreman.localdomain-tomcat-1.0-1.noarch
tfm-pulpcore-python3-pygtrie-2.4.2-2.el7.noarch
tfm-rubygem-rack-jsonp-1.3.1-10.el7.noarch
tfm-pulpcore-python3-ansible-builder-1.0.1-2.el7.noarch
tfm-rubygem-addressable-2.8.0-1.el7.noarch
tfm-pulpcore-python3-pycares-4.1.2-1.el7.x86_64
tfm-rubygem-sequel-5.42.0-2.el7.noarch
tfm-pulpcore-python3-odfpy-1.4.1-5.el7.noarch
tfm-rubygem-fog-core-2.1.0-4.el7.noarch
tfm-pulpcore-python3-django-filter-21.1-1.el7.noarch
tfm-rubygem-net-ping-2.0.1-5.el7.noarch
tfm-pulpcore-python3-requests-2.26.0-3.el7.noarch
tfm-rubygem-fog-vsphere-3.5.0-2.el7.noarch
tfm-pulpcore-python3-pyjwkest-1.4.2-5.el7.noarch
tfm-rubygem-crass-1.0.6-2.el7.noarch
tfm-rubygem-pulp_ansible_client-0.10.1-1.el7.noarch
tfm-rubygem-thread_safe-0.3.6-6.el7.noarch
tfm-rubygem-hammer_cli_foreman-3.1.0-1.el7.noarch
tfm-rubygem-statsd-instrument-2.1.4-4.el7.noarch
tfm-rubygem-pulpcore_client-3.16.0-1.el7.noarch
tfm-rubygem-daemons-1.2.3-7.el7.noarch
tfm-rubygem-katello-4.3.0-1.el7.noarch
tfm-rubygem-kafo-6.4.0-1.el7.noarch
foreman-vmware-3.1.1-1.el7.noarch
tfm-pulpcore-python3-pulp-ansible-0.10.1-1.el7.noarch
tfm-rubygem-promise.rb-0.7.4-3.el7.noarch
tfm-pulpcore-python3-importlib-resources-5.0.0-2.el7.noarch
tfm-rubygem-net_http_unix-0.2.2-2.el7.noarch
tfm-rubygem-sidekiq-5.2.7-4.el7.noarch
tfm-rubygem-server_sent_events-0.1.2-2.el7.noarch
tfm-rubygem-trollop-2.1.2-3.el7.noarch
tfm-rubygem-activerecord-6.0.3.7-1.el7.noarch
tfm-rubygem-friendly_id-5.3.0-2.el7.noarch
tfm-rubygem-roadie-rails-2.1.1-3.el7.noarch
tfm-rubygem-activestorage-6.0.3.7-1.el7.noarch
tfm-pulpcore-python3-chardet-3.0.4-3.el7.noarch
tfm-rubygem-jwt-2.2.2-2.el7.noarch
tfm-pulpcore-python3-debian-0.1.42-1.el7.noarch
tfm-rubygem-sexp_processor-4.10.0-7.el7.noarch
tfm-rubygem-wicked-1.3.3-3.el7.noarch
tfm-pulpcore-python3-url-normalize-1.4.3-3.el7.noarch
tfm-rubygem-get_process_mem-0.2.7-2.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.3.0-2.el7.noarch
tfm-pulpcore-python3-distro-1.6.0-2.el7.noarch
tfm-rubygem-pg-1.1.4-4.el7.x86_64
tfm-rubygem-awesome_print-1.8.0-6.el7.noarch
tfm-pulpcore-python3-prometheus-client-0.8.0-2.el7.noarch
tfm-rubygem-sd_notify-0.1.0-2.el7.noarch
tfm-pulpcore-python3-asyncio-throttle-1.0.2-2.el7.noarch
tfm-rubygem-safemode-1.3.6-2.el7.noarch
tfm-pulpcore-python3-aiofiles-0.7.0-2.el7.noarch
tfm-rubygem-rb-inotify-0.9.7-6.el7.noarch
tfm-pulpcore-python3-redis-3.5.3-2.el7.noarch
tfm-rubygem-robotex-1.0.0-22.el7.noarch
tfm-pulpcore-python3-cryptography-3.1.1-1.el7.x86_64
foreman.localdomain-qpid-router-server-1.0-1.noarch
tfm-pulpcore-python3-et-xmlfile-1.1.0-1.el7.noarch
tfm-rubygem-mime-types-3.3.1-2.el7.noarch
tfm-pulpcore-python3-drf-access-policy-1.1.0-1.el7.noarch
tfm-rubygem-secure_headers-6.3.0-3.el7.noarch
tfm-pulpcore-python3-django-lifecycle-0.9.3-1.el7.noarch
tfm-rubygem-representable-3.0.4-3.el7.noarch
tfm-pulpcore-python3-django-import-export-2.6.1-1.el7.noarch
tfm-rubygem-polyglot-0.3.5-3.el7.noarch
tfm-rubygem-pulp_python_client-3.5.2-1.el7.noarch
tfm-rubygem-domain_name-0.5.20160310-5.el7.noarch
foreman-installer-3.1.1-1.el7.noarch
tfm-rubygem-coffee-script-source-1.12.2-5.el7.noarch
tfm-rubygem-rsec-0.4.3-5.el7.noarch
tfm-rubygem-foreman-tasks-5.2.0-1.fm3_1.el7.noarch
tfm-rubygem-foreman_puppet-2.0.3-1.fm3_1.el7.noarch
tfm-rubygem-signet-0.14.0-2.el7.noarch
tfm-rubygem-smart_proxy_pulp-3.2.0-2.fm3_1.el7.noarch
tfm-pulpcore-python3-socks-1.2.4-2.el7.noarch
tfm-rubygem-websocket-driver-0.7.1-2.el7.x86_64
tfm-rubygem-foreman-tasks-core-0.3.6-1.fm2_5.el7.noarch
tfm-rubygem-railties-6.0.3.7-1.el7.noarch
tfm-rubygem-audited-4.9.0-4.el7.noarch
foreman-release-3.1.1-1.el7.noarch
tfm-pulpcore-python3-idna-3.3-1.el7.noarch
tfm-rubygem-rack-2.2.3-2.el7.noarch
tfm-pulpcore-python3-async-timeout-3.0.1-3.el7.noarch
tfm-rubygem-i18n-1.8.2-2.el7.noarch
tfm-rubygem-pulp_docker_client-4.0.0b6.dev01562331743-1.el7.noarch
tfm-pulpcore-python3-pyparsing-2.4.7-2.el7.noarch
tfm-rubygem-builder-3.2.4-2.el7.noarch
tfm-pulpcore-python3-asgiref-3.4.1-1.el7.noarch
tfm-rubygem-net-ssh-4.2.0-3.el7.noarch
tfm-pulpcore-python3-dateutil-2.8.2-1.el7.noarch
tfm-pulpcore-python3-pbr-5.6.0-1.el7.noarch
tfm-rubygem-rack-protection-2.1.0-2.el7.noarch
tfm-pulpcore-python3-pyflakes-2.3.1-4.el7.noarch
tfm-rubygem-mail-2.7.1-2.el7.noarch
tfm-pulpcore-python3-charset-normalizer-2.0.7-1.el7.noarch
tfm-rubygem-nio4r-2.5.4-2.el7.x86_64
tfm-pulpcore-python3-uritemplate-4.1.1-1.el7.noarch
tfm-rubygem-clamp-1.1.2-7.el7.noarch
tfm-rubygem-gssapi-1.2.0-8.el7.noarch
tfm-rubygem-concurrent-ruby-edge-0.6.0-3.fm2_5.el7.noarch
tfm-rubygem-memoist-0.16.0-3.el7.noarch
tfm-rubygem-unicode-display_width-1.7.0-2.el7.noarch
tfm-rubygem-redis-4.1.2-3.el7.noarch
tfm-rubygem-nokogiri-1.11.3-2.el7.x86_64
tfm-pulpcore-python3-aiohttp-socks-0.6.0-2.el7.noarch
tfm-pulpcore-python3-pkginfo-1.7.1-3.el7.noarch
tfm-rubygem-anemone-0.7.2-23.el7.noarch
tfm-rubygem-validates_lengths_from_database-0.5.0-8.el7.noarch
tfm-rubygem-rails-i18n-6.0.0-3.el7.noarch
tfm-rubygem-record_tag_helper-1.0.1-4.el7.noarch
tfm-rubygem-activejob-6.0.3.7-1.el7.noarch
tfm-rubygem-actionmailer-6.0.3.7-1.el7.noarch
tfm-rubygem-rainbow-2.2.2-1.el7.noarch
tfm-rubygem-webpack-rails-0.9.8-6.el7.noarch
tfm-rubygem-coffee-rails-5.0.0-2.el7.noarch
tfm-rubygem-fog-xenserver-1.0.0-3.el7.noarch
tfm-pulpcore-python3-django-prometheus-2.1.0-2.el7.noarch
tfm-pulpcore-python3-importlib-metadata-1.7.0-2.el7.noarch
tfm-pulpcore-python3-inflection-0.5.1-2.el7.noarch
tfm-pulpcore-python3-certifi-2020.6.20-2.el7.noarch
tfm-pulpcore-python3-xlwt-1.3.0-2.el7.noarch
foreman.localdomain-qpid-client-cert-1.0-1.noarch
tfm-pulpcore-python3-markupsafe-2.0.1-2.el7.x86_64
tfm-pulpcore-python3-parsley-1.3-1.el7.noarch
foreman.localdomain-foreman-client-1.0-1.noarch
tfm-pulpcore-python3-backoff-1.11.1-1.el7.noarch
tfm-pulpcore-python3-pyOpenSSL-19.1.0-2.el7.noarch
foreman.localdomain-foreman-proxy-client-1.0-1.noarch
tfm-pulpcore-python3-pycairo-1.20.1-2.el7.x86_64
tfm-rubygem-little-plugger-1.1.4-3.el7.noarch
tfm-pulpcore-python3-openpyxl-3.0.9-1.el7.noarch
tfm-rubygem-apipie-params-0.0.5-5.el7.noarch
tfm-pulpcore-python3-pytz-2021.3-1.el7.noarch
tfm-rubygem-fog-xml-0.1.2-9.el7.noarch
tfm-pulpcore-python3-drf-nested-routers-0.93.3-3.el7.noarch
tfm-rubygem-declarative-option-0.1.0-3.el7.noarch
tfm-pulpcore-python3-django-guardian-2.4.0-3.el7.noarch
tfm-rubygem-parse-cron-0.1.4-5.fm2_5.el7.noarch
tfm-pulpcore-python3-psycopg2-2.9.1-1.el7.x86_64
tfm-rubygem-optimist-3.0.0-3.el7.noarch
tfm-pulpcore-python3-markuppy-1.14-2.el7.noarch
tfm-rubygem-sinatra-2.1.0-2.el7.noarch
tfm-pulpcore-python3-pulpcore-3.16.1-1.el7.noarch
tfm-rubygem-colorize-0.8.1-2.el7.noarch
tfm-rubygem-rails-html-sanitizer-1.3.0-2.el7.noarch
tfm-rubygem-rubyipmi-0.11.0-1.el7.noarch
tfm-rubygem-http-cookie-1.0.2-5.el7.noarch
tfm-rubygem-puma-5.5.0-1.el7.x86_64
foreman-installer-katello-3.1.1-1.el7.noarch
tfm-rubygem-hashie-3.6.0-3.el7.noarch
tfm-rubygem-pulp_deb_client-2.16.0-1.el7.noarch
tfm-rubygem-coffee-script-2.4.1-5.el7.noarch
tfm-pulpcore-python3-pygobject-3.40.1-2.el7.x86_64
tfm-rubygem-bcrypt_pbkdf-1.1.0-1.el7.x86_64
tfm-rubygem-rest-client-2.0.2-4.el7.noarch
tfm-rubygem-foreman_remote_execution-5.0.1-1.fm3_1.el7.noarch
tfm-pulpcore-python3-libcomps-0.1.18-1.el7.x86_64
foreman-dynflow-sidekiq-3.1.1-1.el7.noarch
tfm-rubygem-googleauth-0.13.1-2.el7.noarch
tfm-rubygem-hammer_cli_katello-1.3.1-1.el7.noarch
tfm-pulpcore-python3-pulp-container-2.9.0-1.el7.noarch
tfm-rubygem-google-cloud-env-1.3.3-2.el7.noarch
tfm-pulpcore-python3-pulp-certguard-1.5.1-1.el7.noarch
tfm-rubygem-parallel-1.19.1-2.el7.noarch
tfm-rubygem-httpclient-2.8.3-4.el7.noarch
tfm-rubygem-foreman_remote_execution_core-1.4.8-1.el7.noarch
tfm-rubygem-rails-dom-testing-2.0.3-7.el7.noarch
tfm-rubygem-sprockets-rails-3.2.1-7.el7.noarch
tfm-rubygem-rabl-0.14.3-2.el7.noarch
tfm-rubygem-will_paginate-3.1.7-4.el7.noarch
tfm-rubygem-qpid_proton-0.36.0-1.el7.x86_64
tfm-rubygem-kafo_parsers-1.2.1-1.el7.noarch
tfm-pulpcore-runtime-1.0-4.el7.x86_64
tfm-pulpcore-python3-setuptools-1.0-4.el7.x86_64
tfm-pulpcore-python3-typing-extensions-3.10.0.2-1.el7.noarch
tfm-rubygem-concurrent-ruby-1.1.6-3.el7.noarch
tfm-pulpcore-python3-semantic-version-2.8.5-2.el7.noarch
tfm-rubygem-ffi-1.12.2-2.el7.x86_64
tfm-pulpcore-python3-packaging-21.2-1.el7.noarch
tfm-rubygem-highline-2.0.3-2.el7.noarch
tfm-pulpcore-python3-idna-ssl-1.1.0-4.el7.noarch
tfm-rubygem-fast_gettext-1.4.1-5.el7.noarch
tfm-pulpcore-python3-iniparse-0.4-34.el7.noarch
tfm-rubygem-gettext_i18n_rails-1.8.0-3.el7.noarch
tfm-pulpcore-python3-sqlparse-0.4.2-2.el7.noarch
tfm-rubygem-tilt-2.0.8-5.el7.noarch
tfm-pulpcore-python3-future-0.18.2-4.el7.noarch
tfm-rubygem-thor-1.0.1-3.el7.noarch
tfm-pulpcore-python3-mccabe-0.6.1-2.el7.noarch
tfm-rubygem-bundler_ext-0.4.1-6.el7.noarch
tfm-pulpcore-python3-bleach-allowlist-1.0.3-2.el7.noarch
tfm-pulpcore-python3-webencodings-0.5.1-2.el7.noarch
tfm-rubygem-ethon-0.12.0-2.el7.noarch
tfm-rubygem-smart_proxy_dynflow_core-0.4.1-1.fm2_6.el7.noarch
tfm-rubygem-racc-1.5.2-1.el7.x86_64
tfm-rubygem-mini_portile2-2.5.1-1.el7.noarch
tfm-pulpcore-python3-filelock-3.0.12-2.el7.noarch
tfm-pulpcore-python3-pulp-python-3.5.2-1.el7.noarch
tfm-rubygem-mustermann-1.1.1-1.el7.noarch
tfm-rubygem-responders-3.0.0-4.el7.noarch
tfm-rubygem-actioncable-6.0.3.7-1.el7.noarch
tfm-rubygem-globalid-0.4.2-2.el7.noarch
tfm-rubygem-actiontext-6.0.3.7-1.el7.noarch
tfm-rubygem-deface-1.5.3-3.el7.noarch
tfm-rubygem-facter-4.0.51-2.el7.x86_64
tfm-rubygem-fog-aws-3.6.5-2.el7.noarch
tfm-pulpcore-python3-markdown-3.3.4-4.el7.noarch
tfm-pulpcore-python3-pyrsistent-0.18.0-1.el7.x86_64
tfm-pulpcore-python3-lxml-4.6.4-1.el7.x86_64
tfm-pulpcore-python3-async-lru-1.0.2-2.el7.noarch
tfm-rubygem-rack-test-1.1.0-5.el7.noarch
tfm-pulpcore-python3-jinja2-3.0.2-1.el7.noarch
tfm-rubygem-ruby-libvirt-0.7.1-2.el7.x86_64
tfm-pulpcore-python3-bindep-2.10.1-1.el7.noarch
foreman.localdomain-apache-1.0-1.noarch
tfm-rubygem-public_suffix-3.0.3-3.el7.noarch
tfm-pulpcore-python3-pycparser-2.20-2.el7.noarch
tfm-rubygem-deacon-1.0.0-5.el7.noarch
tfm-pulpcore-python3-pyjwt-1.7.1-7.el7.noarch
foreman.localdomain-foreman-proxy-1.0-1.noarch
foreman-release-scl-7-3.el7.noarch
tfm-rubygem-roadie-3.4.0-4.el7.noarch
tfm-pulpcore-python3-colorama-0.4.4-2.el7.noarch
tfm-rubygem-logging-2.3.0-2.el7.noarch
tfm-pulpcore-python3-defusedxml-0.7.1-2.el7.noarch
tfm-rubygem-formatador-0.2.1-13.el7.noarch
tfm-pulpcore-python3-django-3.2.9-1.el7.noarch
tfm-rubygem-rkerberos-0.1.5-20.el7.x86_64
tfm-pulpcore-python3-drf-spectacular-0.20.1-1.el7.noarch
tfm-rubygem-rack-cors-1.0.2-3.el7.noarch
tfm-pulpcore-python3-django-guid-3.2.0-2.el7.noarch
tfm-rubygem-unicode-0.4.4.4-4.el7.x86_64
tfm-pulpcore-python3-urllib3-1.26.7-1.el7.noarch
tfm-rubygem-rbvmomi-2.2.0-4.el7.noarch
tfm-pulpcore-python3-xlrd-2.0.1-4.el7.noarch
tfm-rubygem-ovirt-engine-sdk-4.4.0-2.el7.x86_64
tfm-pulpcore-python3-pycryptodomex-3.11.0-1.el7.x86_64
tfm-rubygem-method_source-0.9.2-3.el7.noarch
tfm-pulpcore-python3-solv-0.7.20-4.el7.x86_64
tfm-rubygem-unf_ext-0.0.7.2-4.el7.x86_64
foreman-proxy-3.1.1-1.el7.noarch
tfm-rubygem-marcel-1.0.1-1.el7.noarch
tfm-rubygem-bcrypt-3.1.12-4.el7.x86_64
tfm-rubygem-hammer_cli-3.1.0-1.el7.noarch
tfm-rubygem-powerbar-2.0.1-3.el7.noarch
tfm-rubygem-pulp_file_client-1.10.0-1.el7.noarch
tfm-rubygem-retriable-3.1.2-3.el7.noarch
rubygem-foreman_maintain-1.0.2-1.el7.noarch
tfm-rubygem-os-1.0.0-3.el7.noarch
tfm-rubygem-dynflow-1.6.3-1.fm3_1.el7.noarch
tfm-rubygem-apipie-bindings-0.4.0-2.el7.noarch
foreman-postgresql-3.1.1-1.el7.noarch
tfm-pulpcore-python3-pulp-rpm-3.16.1-2.el7.noarch
tfm-rubygem-multipart-post-2.0.0-3.el7.noarch
foreman-service-3.1.1-1.el7.noarch
foreman-cli-3.1.1-1.el7.noarch
tfm-pulpcore-python3-pulp-file-1.10.1-1.el7.noarch
tfm-rubygem-sshkey-1.9.0-5.el7.noarch
tfm-rubygem-stomp-1.4.9-2.el7.noarch
tfm-rubygem-google-api-client-0.33.2-2.el7.noarch
tfm-rubygem-algebrick-0.7.3-8.el7.noarch
tfm-rubygem-connection_pool-2.2.2-3.el7.noarch
tfm-rubygem-actionview-6.0.3.7-1.el7.noarch
tfm-rubygem-activemodel-6.0.3.7-1.el7.noarch
tfm-rubygem-fx-0.5.0-2.el7.noarch
tfm-rubygem-angular-rails-templates-1.1.0-2.el7.noarch
tfm-rubygem-actionmailbox-6.0.3.7-1.el7.noarch
foreman-debug-3.1.1-1.el7.noarch
tfm-pulpcore-python3-attrs-21.2.0-2.el7.noarch
tfm-rubygem-multi_json-1.14.1-3.el7.noarch
tfm-pulpcore-python3-aioredis-2.0.0-2.el7.noarch
tfm-rubygem-ipaddress-0.8.0-13.el7.noarch
tfm-rubygem-fog-ovirt-2.0.1-2.el7.noarch
tfm-pulpcore-python3-rhsm-1.19.2-2.el7.x86_64
tfm-rubygem-ruby_parser-3.10.1-4.el7.noarch
tfm-rubygem-fog-digitalocean-0.4.0-3.el7.noarch
tfm-pulpcore-python3-dynaconf-3.1.7-2.el7.noarch
tfm-rubygem-excon-0.76.0-2.el7.noarch
tfm-pulpcore-python3-djangorestframework-queryfields-1.0.0-4.el7.noarch
tfm-pulpcore-python3-flake8-3.9.2-3.el7.noarch
tfm-rubygem-ruby2ruby-2.4.2-4.el7.noarch
tfm-pulpcore-python3-aiohttp-xmlrpc-1.3.2-1.el7.noarch
tfm-rubygem-typhoeus-1.3.1-2.el7.noarch
tfm-rubygem-foreman_docker-5.0.0-3.fm2_1.el7.noarch
tfm-pulpcore-python3-ecdsa-0.13.3-3.el7.noarch
tfm-rubygem-ed25519-1.2.4-1.el7.x86_64
tfm-pulpcore-python3-cffi-1.15.0-1.el7.x86_64
foreman.localdomain-qpid-router-client-1.0-1.noarch
tfm-pulpcore-python3-click-8.0.3-1.el7.noarch
tfm-rubygem-mime-types-data-3.2018.0812-5.el7.noarch
tfm-pulpcore-python3-djangorestframework-3.12.4-4.el7.noarch
tfm-rubygem-apipie-dsl-2.4.0-1.el7.noarch
tfm-pulpcore-python3-django-readonly-field-1.0.5-3.el7.noarch
tfm-rubygem-declarative-0.0.10-3.el7.noarch
tfm-pulpcore-python3-tablib-3.1.0-1.el7.noarch
tfm-rubygem-amazing_print-1.1.0-2.el7.noarch
tfm-rubygem-pulp_certguard_client-1.5.0-1.el7.noarch
tfm-rubygem-unf-0.1.3-9.el7.noarch
tfm-rubygem-erubi-1.9.0-2.el7.noarch
tfm-rubygem-msgpack-1.3.3-2.el7.x86_64
tfm-rubygem-locale-2.0.9-15.el7.noarch
foreman-3.1.1-1.el7.noarch
tfm-rubygem-faraday-0.17.3-2.el7.noarch
tfm-rubygem-ruby2_keywords-0.0.4-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_puppet-0.0.4-1.fm3_1.el7.noarch
foreman-selinux-3.1.1-1.el7.noarch
tfm-rubygem-websocket-extensions-0.1.5-2.el7.noarch
tfm-rubygem-qpid_messaging-1.38.0-1.el7.x86_64
tfm-rubygem-actionpack-6.0.3.7-1.el7.noarch
tfm-rubygem-activerecord-session_store-2.0.0-1.el7.noarch
tfm-rubygem-ancestry-3.0.7-2.el7.noarch
tfm-rubygem-runcible-2.13.1-2.el7.noarch
tfm-rubygem-rails-6.0.3.7-1.el7.noarch
tfm-rubygem-activerecord-import-1.1.0-1.el7.noarch
foreman.localdomain-qpid-broker-1.0-2.noarch
tfm-pulpcore-python3-pyyaml-5.4.1-3.el7.x86_64
tfm-pulpcore-python3-yarl-1.7.2-1.el7.x86_64
tfm-rubygem-sprockets-4.0.2-2.el7.noarch
tfm-pulpcore-python3-productmd-1.33-2.el7.noarch
tfm-rubygem-fog-google-1.11.0-2.el7.noarch
tfm-pulpcore-python3-gunicorn-20.1.0-3.el7.noarch
tfm-rubygem-mini_mime-1.0.2-2.el7.noarch
tfm-rubygem-fog-openstack-1.0.8-4.el7.noarch
tfm-pulpcore-python3-diff-match-patch-20200713-2.el7.noarch
tfm-rubygem-net-ldap-0.17.0-2.el7.noarch
tfm-pulpcore-python3-zipp-3.4.0-3.el7.noarch
tfm-pulpcore-python3-requirements-parser-0.2.0-2.el7.noarch
tfm-rubygem-kafo_wizards-0.0.2-2.el7.noarch
tfm-pulpcore-python3-whitenoise-5.3.0-1.el7.noarch
tfm-rubygem-zeitwerk-2.2.2-2.el7.noarch
tfm-pulpcore-python3-urlman-1.4.0-2.el7.noarch
tfm-rubygem-css_parser-1.4.7-5.el7.noarch
tfm-rubygem-sqlite3-1.3.13-7.el7.x86_64
tfm-pulpcore-python3-aiodns-3.0.0-2.el7.noarch
tfm-rubygem-ansi-1.5.0-3.el7.noarch
foreman.localdomain-puppet-client-1.0-1.noarch
tfm-pulpcore-python3-gnupg-0.4.7-2.el7.noarch
tfm-rubygem-fog-json-1.2.0-4.el7.noarch
tfm-pulpcore-python3-django-currentuser-0.5.3-3.el7.noarch
tfm-rubygem-uber-0.1.0-3.el7.noarch
tfm-runtime-7.0-4.el7.x86_64
tfm-pulpcore-python3-galaxy-importer-0.4.1-1.el7.noarch
tfm-rubygem-pulp_ostree_client-2.0.0-0.1.a1.el7.noarch
tfm-rubygem-loofah-2.4.0-2.el7.noarch
tfm-rubygem-pulp_rpm_client-3.16.1-1.el7.noarch
tfm-rubygem-tzinfo-1.2.6-2.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.17-1.fm3_1.el7.noarch
tfm-rubygem-execjs-2.7.0-5.el7.noarch
tfm-rubygem-pulp_container_client-2.9.0-1.el7.noarch
tfm-rubygem-netrc-0.11.0-6.el7.noarch
tfm-rubygem-smart_proxy_dynflow-0.6.1-2.fm3_1.el7.noarch
tfm-pulpcore-python3-pulp-deb-2.16.1-1.el7.noarch
tfm-rubygem-graphql-batch-0.3.10-3.el7.noarch
tfm-pulpcore-python3-bandersnatch-4.4.0-4.el7.noarch
tfm-rubygem-puma-status-1.3-1.el7.noarch
tfm-rubygem-gitlab-sidekiq-fetcher-0.6.0-2.el7.noarch
tfm-rubygem-redfish_client-0.5.2-2.el7.noarch
tfm-rubygem-activesupport-6.0.3.7-1.el7.noarch
tfm-rubygem-scoped_search-4.1.9-2.el7.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.fm3_0.el7.noarch

Distribution and version:
Foreman Server:

$ cat /etc/redhat-release 
CentOS Linux release 7.9.2009 (Core)

Other relevant data:
I am trying to delete my now obsolete CentOS 8 content view and ran into the error above. The only thing I found while searching was this issue in the Pulp tracker: Issue #8351: Error when deleting content - violates foreign key constraint - Migration Plugin - Pulp
I can no longer reinstall the Pulp 2 to 3 migration plugin because I’m past being able to use that version of Pulp with my Foreman install. Unfortunately they did not post the database tables to be dropped in that issue. Does anyone know what tables should be dropped/truncated to get past this failure?

Thanks,
Chris M

1 Like

I’m also suffering from this problem.

Initially I discovered I had a bunch of Remove Orphan tasks that had paused/error with:

update or delete on table "core_content" violates foreign key constraint "pulp_2to3_migration__pulp3_content_id_6271a7bb_fk_core_cont" on table "pulp_2to3_migration_pulp2content"
DETAIL:  Key (pulp_id)=(8da98e4b-2321-40cd-9da5-49299bdf7cf4) is still referenced from table "pulp_2to3_migration_pulp2content".

I’ve now realised that I cannot promote or delete any Content versions as they fail with the same error.

I’m running on CentOS 7.9.2009

Installed Packages
candlepin-4.1.8-1.el7.noarch
candlepin-selinux-4.1.8-1.el7.noarch
foreman-3.1.0-1.el7.noarch
foreman-cli-3.1.0-1.el7.noarch
foreman-debug-3.1.0-1.el7.noarch
foreman-dynflow-sidekiq-3.1.0-1.el7.noarch
foreman-installer-3.1.0-1.el7.noarch
foreman-installer-katello-3.1.0-1.el7.noarch
foreman-postgresql-3.1.0-1.el7.noarch
foreman-proxy-3.1.0-1.el7.noarch
foreman-release-3.1.0-1.el7.noarch
foreman-release-scl-7-3.el7.noarch
foreman-selinux-3.1.0-1.el7.noarch
foreman-service-3.1.0-1.el7.noarch
foreman-vmware-3.1.0-1.el7.noarch
katello-4.3.0-0.6.rc4.el7.noarch
katello-certs-tools-2.8.2-1.el7.noarch
katello-client-bootstrap-1.7.7-1.el7.noarch
katello-common-4.3.0-0.6.rc4.el7.noarch
katello-debug-4.3.0-0.6.rc4.el7.noarch
katello-default-ca-1.0-1.noarch
katello-host-tools-3.5.1-2.el7.noarch
katello-host-tools-fact-plugin-3.5.1-2.el7.noarch
katello-repos-4.3.0-0.2.rc4.el7.noarch
katello-selinux-4.0.2-1.el7.noarch
katello-server-ca-1.0-10.noarch
katello-service-3.14.1-1.el7.noarch
pulp-client-1.0-10.noarch
pulpcore-selinux-1.2.6-2.el7.x86_64
python-gofer-qpid-2.12.5-3.el7.noarch
python2-qpid-1.37.0-5.el7.noarch
python2-qpid-qmf-1.39.0-1.el7.x86_64
python36-qpid-proton-0.35.0-1.el7.x86_64
qpid-cpp-client-1.39.0-1.el7.x86_64
qpid-cpp-client-devel-1.39.0-1.el7.x86_64
qpid-cpp-server-1.39.0-1.el7.x86_64
qpid-cpp-server-linearstore-1.39.0-1.el7.x86_64
qpid-dispatch-router-1.17.0-1.el7.x86_64
qpid-proton-c-0.35.0-1.el7.x86_64
qpid-qmf-1.39.0-1.el7.x86_64
qpid-tools-1.39.0-1.el7.noarch
qpid_router_katello_agent-qpid-router-client-1.0-1.noarch
rubygem-foreman_maintain-0.9.2-1.el7.noarch
tfm-pulpcore-python3-aiodns-3.0.0-2.el7.noarch
tfm-pulpcore-python3-aiofiles-0.7.0-2.el7.noarch
tfm-pulpcore-python3-aiohttp-3.7.4-4.el7.x86_64
tfm-pulpcore-python3-aiohttp-socks-0.6.0-2.el7.noarch
tfm-pulpcore-python3-aiohttp-xmlrpc-1.3.2-1.el7.noarch
tfm-pulpcore-python3-aioredis-2.0.0-2.el7.noarch
tfm-pulpcore-python3-ansible-builder-1.0.1-2.el7.noarch
tfm-pulpcore-python3-asgiref-3.4.1-1.el7.noarch
tfm-pulpcore-python3-async-lru-1.0.2-2.el7.noarch
tfm-pulpcore-python3-async-timeout-3.0.1-3.el7.noarch
tfm-pulpcore-python3-asyncio-throttle-1.0.2-2.el7.noarch
tfm-pulpcore-python3-attrs-21.2.0-2.el7.noarch
tfm-pulpcore-python3-backoff-1.11.1-1.el7.noarch
tfm-pulpcore-python3-bandersnatch-4.4.0-4.el7.noarch
tfm-pulpcore-python3-bindep-2.10.1-1.el7.noarch
tfm-pulpcore-python3-bleach-3.3.1-1.el7.noarch
tfm-pulpcore-python3-bleach-allowlist-1.0.3-2.el7.noarch
tfm-pulpcore-python3-certifi-2020.6.20-2.el7.noarch
tfm-pulpcore-python3-cffi-1.15.0-1.el7.x86_64
tfm-pulpcore-python3-chardet-3.0.4-3.el7.noarch
tfm-pulpcore-python3-charset-normalizer-2.0.7-1.el7.noarch
tfm-pulpcore-python3-click-8.0.3-1.el7.noarch
tfm-pulpcore-python3-colorama-0.4.4-2.el7.noarch
tfm-pulpcore-python3-createrepo_c-0.17.6-4.el7.x86_64
tfm-pulpcore-python3-cryptography-3.1.1-1.el7.x86_64
tfm-pulpcore-python3-dateutil-2.8.2-1.el7.noarch
tfm-pulpcore-python3-debian-0.1.42-1.el7.noarch
tfm-pulpcore-python3-defusedxml-0.7.1-2.el7.noarch
tfm-pulpcore-python3-diff-match-patch-20200713-2.el7.noarch
tfm-pulpcore-python3-distro-1.6.0-1.el7.noarch
tfm-pulpcore-python3-django-3.2.9-1.el7.noarch
tfm-pulpcore-python3-django-currentuser-0.5.3-3.el7.noarch
tfm-pulpcore-python3-django-filter-21.1-1.el7.noarch
tfm-pulpcore-python3-django-guardian-2.4.0-3.el7.noarch
tfm-pulpcore-python3-django-guid-3.2.0-2.el7.noarch
tfm-pulpcore-python3-django-import-export-2.6.1-1.el7.noarch
tfm-pulpcore-python3-django-lifecycle-0.9.3-1.el7.noarch
tfm-pulpcore-python3-django-prometheus-2.1.0-2.el7.noarch
tfm-pulpcore-python3-django-readonly-field-1.0.5-3.el7.noarch
tfm-pulpcore-python3-djangorestframework-3.12.4-4.el7.noarch
tfm-pulpcore-python3-djangorestframework-queryfields-1.0.0-4.el7.noarch
tfm-pulpcore-python3-drf-access-policy-1.1.0-1.el7.noarch
tfm-pulpcore-python3-drf-nested-routers-0.93.3-3.el7.noarch
tfm-pulpcore-python3-drf-spectacular-0.20.1-1.el7.noarch
tfm-pulpcore-python3-dynaconf-3.1.7-2.el7.noarch
tfm-pulpcore-python3-ecdsa-0.13.3-3.el7.noarch
tfm-pulpcore-python3-et-xmlfile-1.1.0-1.el7.noarch
tfm-pulpcore-python3-filelock-3.0.12-2.el7.noarch
tfm-pulpcore-python3-flake8-3.9.2-3.el7.noarch
tfm-pulpcore-python3-future-0.18.2-4.el7.noarch
tfm-pulpcore-python3-galaxy-importer-0.4.1-1.el7.noarch
tfm-pulpcore-python3-gnupg-0.4.7-2.el7.noarch
tfm-pulpcore-python3-gunicorn-20.1.0-3.el7.noarch
tfm-pulpcore-python3-idna-3.3-1.el7.noarch
tfm-pulpcore-python3-idna-ssl-1.1.0-4.el7.noarch
tfm-pulpcore-python3-importlib-metadata-1.7.0-2.el7.noarch
tfm-pulpcore-python3-importlib-resources-5.0.0-2.el7.noarch
tfm-pulpcore-python3-inflection-0.5.1-2.el7.noarch
tfm-pulpcore-python3-iniparse-0.4-34.el7.noarch
tfm-pulpcore-python3-jinja2-3.0.2-1.el7.noarch
tfm-pulpcore-python3-jsonschema-3.2.0-7.el7.noarch
tfm-pulpcore-python3-libcomps-0.1.18-1.el7.x86_64
tfm-pulpcore-python3-lxml-4.6.4-1.el7.x86_64
tfm-pulpcore-python3-markdown-3.3.4-4.el7.noarch
tfm-pulpcore-python3-markuppy-1.14-2.el7.noarch
tfm-pulpcore-python3-markupsafe-2.0.1-1.el7.x86_64
tfm-pulpcore-python3-mccabe-0.6.1-2.el7.noarch
tfm-pulpcore-python3-multidict-5.2.0-1.el7.x86_64
tfm-pulpcore-python3-odfpy-1.4.1-5.el7.noarch
tfm-pulpcore-python3-openpyxl-3.0.9-1.el7.noarch
tfm-pulpcore-python3-packaging-21.2-1.el7.noarch
tfm-pulpcore-python3-parsley-1.3-1.el7.noarch
tfm-pulpcore-python3-pbr-5.6.0-1.el7.noarch
tfm-pulpcore-python3-pkginfo-1.7.1-3.el7.noarch
tfm-pulpcore-python3-productmd-1.33-2.el7.noarch
tfm-pulpcore-python3-prometheus-client-0.8.0-2.el7.noarch
tfm-pulpcore-python3-psycopg2-2.9.1-1.el7.x86_64
tfm-pulpcore-python3-pulp-ansible-0.10.1-1.el7.noarch
tfm-pulpcore-python3-pulp-certguard-1.5.1-1.el7.noarch
tfm-pulpcore-python3-pulp-container-2.9.0-1.el7.noarch
tfm-pulpcore-python3-pulp-deb-2.16.0-1.el7.noarch
tfm-pulpcore-python3-pulp-file-1.10.1-1.el7.noarch
tfm-pulpcore-python3-pulp-python-3.5.2-1.el7.noarch
tfm-pulpcore-python3-pulp-rpm-3.16.1-1.el7.noarch
tfm-pulpcore-python3-pulpcore-3.16.1-1.el7.noarch
tfm-pulpcore-python3-pyOpenSSL-19.1.0-2.el7.noarch
tfm-pulpcore-python3-pycairo-1.20.1-2.el7.x86_64
tfm-pulpcore-python3-pycares-4.1.2-1.el7.x86_64
tfm-pulpcore-python3-pycodestyle-2.7.0-4.el7.noarch
tfm-pulpcore-python3-pycparser-2.20-2.el7.noarch
tfm-pulpcore-python3-pycryptodomex-3.11.0-1.el7.x86_64
tfm-pulpcore-python3-pyflakes-2.3.1-4.el7.noarch
tfm-pulpcore-python3-pygobject-3.42.0-1.el7.x86_64
tfm-pulpcore-python3-pygtrie-2.4.2-2.el7.noarch
tfm-pulpcore-python3-pyjwkest-1.4.2-5.el7.noarch
tfm-pulpcore-python3-pyjwt-1.7.1-7.el7.noarch
tfm-pulpcore-python3-pyparsing-2.4.7-2.el7.noarch
tfm-pulpcore-python3-pyrsistent-0.18.0-1.el7.x86_64
tfm-pulpcore-python3-pytz-2021.3-1.el7.noarch
tfm-pulpcore-python3-pyyaml-5.4.1-3.el7.x86_64
tfm-pulpcore-python3-redis-3.5.3-2.el7.noarch
tfm-pulpcore-python3-requests-2.26.0-3.el7.noarch
tfm-pulpcore-python3-requirements-parser-0.2.0-2.el7.noarch
tfm-pulpcore-python3-rhsm-1.19.2-2.el7.x86_64
tfm-pulpcore-python3-semantic-version-2.8.5-2.el7.noarch
tfm-pulpcore-python3-setuptools-1.0-4.el7.x86_64
tfm-pulpcore-python3-six-1.16.0-1.el7.noarch
tfm-pulpcore-python3-socks-1.2.4-2.el7.noarch
tfm-pulpcore-python3-solv-0.7.20-4.el7.x86_64
tfm-pulpcore-python3-sqlparse-0.4.2-2.el7.noarch
tfm-pulpcore-python3-tablib-3.1.0-1.el7.noarch
tfm-pulpcore-python3-typing-extensions-3.10.0.2-1.el7.noarch
tfm-pulpcore-python3-uritemplate-4.1.1-1.el7.noarch
tfm-pulpcore-python3-url-normalize-1.4.3-3.el7.noarch
tfm-pulpcore-python3-urllib3-1.26.7-1.el7.noarch
tfm-pulpcore-python3-urlman-1.4.0-2.el7.noarch
tfm-pulpcore-python3-webencodings-0.5.1-2.el7.noarch
tfm-pulpcore-python3-whitenoise-5.3.0-1.el7.noarch
tfm-pulpcore-python3-xlrd-2.0.1-4.el7.noarch
tfm-pulpcore-python3-xlwt-1.3.0-2.el7.noarch
tfm-pulpcore-python3-yarl-1.7.2-1.el7.x86_64
tfm-pulpcore-python3-zipp-3.4.0-3.el7.noarch
tfm-pulpcore-runtime-1.0-4.el7.x86_64
tfm-rubygem-actioncable-6.0.3.7-1.el7.noarch
tfm-rubygem-actionmailbox-6.0.3.7-1.el7.noarch
tfm-rubygem-actionmailer-6.0.3.7-1.el7.noarch
tfm-rubygem-actionpack-6.0.3.7-1.el7.noarch
tfm-rubygem-actiontext-6.0.3.7-1.el7.noarch
tfm-rubygem-actionview-6.0.3.7-1.el7.noarch
tfm-rubygem-activejob-6.0.3.7-1.el7.noarch
tfm-rubygem-activemodel-6.0.3.7-1.el7.noarch
tfm-rubygem-activerecord-6.0.3.7-1.el7.noarch
tfm-rubygem-activerecord-import-1.1.0-1.el7.noarch
tfm-rubygem-activerecord-session_store-2.0.0-1.el7.noarch
tfm-rubygem-activestorage-6.0.3.7-1.el7.noarch
tfm-rubygem-activesupport-6.0.3.7-1.el7.noarch
tfm-rubygem-addressable-2.8.0-1.el7.noarch
tfm-rubygem-algebrick-0.7.3-8.el7.noarch
tfm-rubygem-amazing_print-1.1.0-2.el7.noarch
tfm-rubygem-ancestry-3.0.7-2.el7.noarch
tfm-rubygem-anemone-0.7.2-23.el7.noarch
tfm-rubygem-angular-rails-templates-1.1.0-2.el7.noarch
tfm-rubygem-ansi-1.5.0-3.el7.noarch
tfm-rubygem-apipie-bindings-0.4.0-2.el7.noarch
tfm-rubygem-apipie-dsl-2.4.0-1.el7.noarch
tfm-rubygem-apipie-params-0.0.5-5.el7.noarch
tfm-rubygem-apipie-rails-0.5.17-4.el7.noarch
tfm-rubygem-audited-4.9.0-4.el7.noarch
tfm-rubygem-awesome_print-1.8.0-6.el7.noarch
tfm-rubygem-azure_mgmt_compute-0.22.0-1.el7.noarch
tfm-rubygem-azure_mgmt_network-0.26.1-1.el7.noarch
tfm-rubygem-azure_mgmt_resources-0.18.2-1.el7.noarch
tfm-rubygem-azure_mgmt_storage-0.23.0-1.el7.noarch
tfm-rubygem-azure_mgmt_subscriptions-0.18.5-1.el7.noarch
tfm-rubygem-bcrypt-3.1.12-4.el7.x86_64
tfm-rubygem-bcrypt_pbkdf-1.1.0-1.el7.x86_64
tfm-rubygem-builder-3.2.4-2.el7.noarch
tfm-rubygem-bundler_ext-0.4.1-6.el7.noarch
tfm-rubygem-clamp-1.1.2-7.el7.noarch
tfm-rubygem-coffee-rails-5.0.0-2.el7.noarch
tfm-rubygem-coffee-script-2.4.1-5.el7.noarch
tfm-rubygem-coffee-script-source-1.12.2-5.el7.noarch
tfm-rubygem-colorize-0.8.1-2.el7.noarch
tfm-rubygem-concurrent-ruby-1.1.6-3.el7.noarch
tfm-rubygem-concurrent-ruby-edge-0.6.0-3.fm2_5.el7.noarch
tfm-rubygem-connection_pool-2.2.2-3.el7.noarch
tfm-rubygem-crass-1.0.6-2.el7.noarch
tfm-rubygem-css_parser-1.4.7-5.el7.noarch
tfm-rubygem-daemons-1.2.3-7.el7.noarch
tfm-rubygem-deacon-1.0.0-5.el7.noarch
tfm-rubygem-deep_cloneable-3.0.0-4.el7.noarch
tfm-rubygem-deface-1.5.3-3.el7.noarch
tfm-rubygem-domain_name-0.5.20160310-5.el7.noarch
tfm-rubygem-dynflow-1.6.2-1.fm3_1.el7.noarch
tfm-rubygem-ed25519-1.2.4-1.el7.x86_64
tfm-rubygem-erubi-1.9.0-2.el7.noarch
tfm-rubygem-ethon-0.12.0-2.el7.noarch
tfm-rubygem-excon-0.76.0-2.el7.noarch
tfm-rubygem-execjs-2.7.0-5.el7.noarch
tfm-rubygem-facter-4.0.51-2.el7.x86_64
tfm-rubygem-faraday-0.17.3-2.el7.noarch
tfm-rubygem-faraday-cookie_jar-0.0.6-2.el7.noarch
tfm-rubygem-fast_gettext-1.4.1-5.el7.noarch
tfm-rubygem-ffi-1.12.2-2.el7.x86_64
tfm-rubygem-fog-core-2.1.0-4.el7.noarch
tfm-rubygem-fog-vsphere-3.5.0-2.el7.noarch
tfm-rubygem-foreman-tasks-5.2.0-1.fm3_1.el7.noarch
tfm-rubygem-foreman-tasks-core-0.3.6-1.fm2_5.el7.noarch
tfm-rubygem-foreman_azure_rm-2.2.6-1.fm3_1.el7.noarch
tfm-rubygem-foreman_puppet-2.0.0-1.fm3_1.el7.noarch
tfm-rubygem-foreman_remote_execution-5.0.1-1.fm3_1.el7.noarch
tfm-rubygem-foreman_remote_execution_core-1.4.8-1.el7.noarch
tfm-rubygem-formatador-0.2.1-13.el7.noarch
tfm-rubygem-friendly_id-5.3.0-2.el7.noarch
tfm-rubygem-fx-0.5.0-2.el7.noarch
tfm-rubygem-get_process_mem-0.2.7-2.el7.noarch
tfm-rubygem-gettext_i18n_rails-1.8.0-3.el7.noarch
tfm-rubygem-gitlab-sidekiq-fetcher-0.6.0-2.el7.noarch
tfm-rubygem-globalid-0.4.2-2.el7.noarch
tfm-rubygem-graphql-1.8.14-3.el7.noarch
tfm-rubygem-graphql-batch-0.3.10-3.el7.noarch
tfm-rubygem-gssapi-1.2.0-8.el7.noarch
tfm-rubygem-hammer_cli-3.1.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-3.1.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.3.0-2.el7.noarch
tfm-rubygem-hammer_cli_foreman_puppet-0.0.4-1.fm3_1.el7.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.fm3_0.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.16-1.fm3_0.el7.noarch
tfm-rubygem-hammer_cli_katello-1.3.1-1.el7.noarch
tfm-rubygem-hashie-3.6.0-3.el7.noarch
tfm-rubygem-highline-2.0.3-2.el7.noarch
tfm-rubygem-hocon-1.3.1-2.el7.noarch
tfm-rubygem-http-cookie-1.0.2-5.el7.noarch
tfm-rubygem-i18n-1.8.2-2.el7.noarch
tfm-rubygem-jwt-2.2.2-2.el7.noarch
tfm-rubygem-kafo-6.4.0-1.el7.noarch
tfm-rubygem-kafo_parsers-1.2.1-1.el7.noarch
tfm-rubygem-kafo_wizards-0.0.2-2.el7.noarch
tfm-rubygem-katello-4.3.0-0.5.rc4.el7.noarch
tfm-rubygem-ldap_fluff-0.6.0-1.el7.noarch
tfm-rubygem-little-plugger-1.1.4-3.el7.noarch
tfm-rubygem-locale-2.0.9-15.el7.noarch
tfm-rubygem-logging-2.3.0-2.el7.noarch
tfm-rubygem-loofah-2.4.0-2.el7.noarch
tfm-rubygem-mail-2.7.1-2.el7.noarch
tfm-rubygem-marcel-1.0.1-1.el7.noarch
tfm-rubygem-method_source-0.9.2-3.el7.noarch
tfm-rubygem-mime-types-3.3.1-2.el7.noarch
tfm-rubygem-mime-types-data-3.2018.0812-5.el7.noarch
tfm-rubygem-mini_mime-1.0.2-2.el7.noarch
tfm-rubygem-mini_portile2-2.5.1-1.el7.noarch
tfm-rubygem-mqtt-0.5.0-1.el7.noarch
tfm-rubygem-ms_rest-0.7.6-1.el7.noarch
tfm-rubygem-ms_rest_azure-0.12.0-1.el7.noarch
tfm-rubygem-msgpack-1.3.3-2.el7.x86_64
tfm-rubygem-multi_json-1.14.1-3.el7.noarch
tfm-rubygem-multipart-post-2.0.0-3.el7.noarch
tfm-rubygem-mustermann-1.1.1-1.el7.noarch
tfm-rubygem-net-ldap-0.17.0-2.el7.noarch
tfm-rubygem-net-ping-2.0.1-5.el7.noarch
tfm-rubygem-net-scp-1.2.1-5.el7.noarch
tfm-rubygem-net-ssh-4.2.0-3.el7.noarch
tfm-rubygem-net_http_unix-0.2.2-2.el7.noarch
tfm-rubygem-netrc-0.11.0-6.el7.noarch
tfm-rubygem-nio4r-2.5.4-2.el7.x86_64
tfm-rubygem-nokogiri-1.11.3-2.el7.x86_64
tfm-rubygem-oauth-0.5.4-5.el7.noarch
tfm-rubygem-optimist-3.0.0-3.el7.noarch
tfm-rubygem-parallel-1.19.1-2.el7.noarch
tfm-rubygem-parse-cron-0.1.4-5.fm2_5.el7.noarch
tfm-rubygem-pg-1.1.4-4.el7.x86_64
tfm-rubygem-polyglot-0.3.5-3.el7.noarch
tfm-rubygem-powerbar-2.0.1-3.el7.noarch
tfm-rubygem-promise.rb-0.7.4-3.el7.noarch
tfm-rubygem-public_suffix-3.0.3-3.el7.noarch
tfm-rubygem-pulp_ansible_client-0.10.1-1.el7.noarch
tfm-rubygem-pulp_certguard_client-1.5.0-1.el7.noarch
tfm-rubygem-pulp_container_client-2.9.0-1.el7.noarch
tfm-rubygem-pulp_deb_client-2.16.0-1.el7.noarch
tfm-rubygem-pulp_docker_client-4.0.0b6.dev01562331743-1.el7.noarch
tfm-rubygem-pulp_file_client-1.10.0-1.el7.noarch
tfm-rubygem-pulp_ostree_client-2.0.0-0.1.a1.el7.noarch
tfm-rubygem-pulp_python_client-3.5.2-1.el7.noarch
tfm-rubygem-pulp_rpm_client-3.16.1-1.el7.noarch
tfm-rubygem-pulpcore_client-3.16.0-1.el7.noarch
tfm-rubygem-puma-5.5.0-1.el7.x86_64
tfm-rubygem-puma-status-1.3-1.el7.noarch
tfm-rubygem-qpid_messaging-1.38.0-1.el7.x86_64
tfm-rubygem-qpid_proton-0.35.0-1.el7.x86_64
tfm-rubygem-rabl-0.14.3-2.el7.noarch
tfm-rubygem-racc-1.5.2-1.el7.x86_64
tfm-rubygem-rack-2.2.3-2.el7.noarch
tfm-rubygem-rack-cors-1.0.2-3.el7.noarch
tfm-rubygem-rack-jsonp-1.3.1-10.el7.noarch
tfm-rubygem-rack-protection-2.1.0-2.el7.noarch
tfm-rubygem-rack-test-1.1.0-5.el7.noarch
tfm-rubygem-rails-6.0.3.7-1.el7.noarch
tfm-rubygem-rails-dom-testing-2.0.3-7.el7.noarch
tfm-rubygem-rails-html-sanitizer-1.3.0-2.el7.noarch
tfm-rubygem-rails-i18n-6.0.0-3.el7.noarch
tfm-rubygem-railties-6.0.3.7-1.el7.noarch
tfm-rubygem-rainbow-2.2.2-1.el7.noarch
tfm-rubygem-rake-compiler-1.0.7-4.el7.noarch
tfm-rubygem-rb-inotify-0.9.7-6.el7.noarch
tfm-rubygem-rbvmomi-2.2.0-4.el7.noarch
tfm-rubygem-record_tag_helper-1.0.1-4.el7.noarch
tfm-rubygem-redfish_client-0.5.2-2.el7.noarch
tfm-rubygem-redis-4.1.2-3.el7.noarch
tfm-rubygem-responders-3.0.0-4.el7.noarch
tfm-rubygem-rest-client-2.0.2-4.el7.noarch
tfm-rubygem-rkerberos-0.1.5-20.el7.x86_64
tfm-rubygem-roadie-3.4.0-4.el7.noarch
tfm-rubygem-roadie-rails-2.1.1-3.el7.noarch
tfm-rubygem-robotex-1.0.0-22.el7.noarch
tfm-rubygem-rsec-0.4.3-5.el7.noarch
tfm-rubygem-ruby-libvirt-0.7.1-2.el7.x86_64
tfm-rubygem-ruby2_keywords-0.0.4-1.el7.noarch
tfm-rubygem-ruby2ruby-2.4.2-4.el7.noarch
tfm-rubygem-ruby_parser-3.10.1-4.el7.noarch
tfm-rubygem-rubyipmi-0.11.0-1.el7.noarch
tfm-rubygem-runcible-2.13.1-2.el7.noarch
tfm-rubygem-safemode-1.3.6-2.el7.noarch
tfm-rubygem-scoped_search-4.1.9-2.el7.noarch
tfm-rubygem-sd_notify-0.1.0-2.el7.noarch
tfm-rubygem-secure_headers-6.3.0-3.el7.noarch
tfm-rubygem-sequel-5.42.0-2.el7.noarch
tfm-rubygem-server_sent_events-0.1.2-2.el7.noarch
tfm-rubygem-sexp_processor-4.10.0-7.el7.noarch
tfm-rubygem-sidekiq-5.2.7-4.el7.noarch
tfm-rubygem-sinatra-2.1.0-2.el7.noarch
tfm-rubygem-smart_proxy_dynflow-0.6.1-1.fm3_1.el7.noarch
tfm-rubygem-smart_proxy_dynflow_core-0.4.1-1.fm2_6.el7.noarch
tfm-rubygem-smart_proxy_pulp-3.2.0-1.fm3_1.el7.noarch
tfm-rubygem-smart_proxy_remote_execution_ssh-0.5.0-1.fm3_1.el7.noarch
tfm-rubygem-sprockets-4.0.2-2.el7.noarch
tfm-rubygem-sprockets-rails-3.2.1-7.el7.noarch
tfm-rubygem-sqlite3-1.3.13-7.el7.x86_64
tfm-rubygem-sshkey-1.9.0-5.el7.noarch
tfm-rubygem-statsd-instrument-2.1.4-4.el7.noarch
tfm-rubygem-stomp-1.4.9-2.el7.noarch
tfm-rubygem-thor-1.0.1-3.el7.noarch
tfm-rubygem-thread_safe-0.3.6-6.el7.noarch
tfm-rubygem-tilt-2.0.8-5.el7.noarch
tfm-rubygem-timeliness-0.3.10-2.el7.noarch
tfm-rubygem-typhoeus-1.3.1-2.el7.noarch
tfm-rubygem-tzinfo-1.2.6-2.el7.noarch
tfm-rubygem-unf-0.1.3-9.el7.noarch
tfm-rubygem-unf_ext-0.0.7.2-4.el7.x86_64
tfm-rubygem-unicode-0.4.4.4-4.el7.x86_64
tfm-rubygem-unicode-display_width-1.7.0-2.el7.noarch
tfm-rubygem-validates_lengths_from_database-0.5.0-8.el7.noarch
tfm-rubygem-webpack-rails-0.9.8-6.el7.noarch
tfm-rubygem-websocket-driver-0.7.1-2.el7.x86_64
tfm-rubygem-websocket-extensions-0.1.5-2.el7.noarch
tfm-rubygem-will_paginate-3.1.7-4.el7.noarch
tfm-rubygem-xmlrpc-0.3.0-3.el7.noarch
tfm-rubygem-zeitwerk-2.2.2-2.el7.noarch
tfm-runtime-7.0-4.el7.x86_64

Here’s a backtrace:

Actions::Pulp3::OrphanCleanup::RemoveOrphans

Input:
{"smart_proxy_id"=>1,
 "remote_user"=>"admin",
 "remote_cp_user"=>"admin",
 "current_request_id"=>nil,
 "current_timezone"=>"UTC",
 "current_organization_id"=>nil,
 "current_location_id"=>nil,
 "current_user_id"=>1}

Output:
{"pulp_tasks"=>
  [{"pulp_href"=>"/pulp/api/v3/tasks/59ae82a3-689f-4c38-afb0-bc57a618a9c6/",
    "pulp_created"=>"2022-04-17T21:00:55.823+00:00",
    "state"=>"failed",
    "name"=>"pulpcore.app.tasks.orphan.orphan_cleanup",
    "logging_cid"=>"5636f9dc2ff2447a99f29e8b5f8482b1",
    "started_at"=>"2022-04-17T21:00:56.327+00:00",
    "finished_at"=>"2022-04-17T21:01:21.162+00:00",
    "error"=>
     {"traceback"=>
       #<Sequel::SQL::Blob:0xe4a8f4 bytes=139 start="  File \"/o" end="form_task\n"> +
       #<Sequel::SQL::Blob:0xe4a908 bytes=35 start="    result" end="**kwargs)\n"> +
       #<Sequel::SQL::Blob:0xe4a91c bytes=132 start="  File \"/o" end="n_cleanup\n"> +
       #<Sequel::SQL::Blob:0xe4a930 bytes=15 content="    c.delete()\n"> +
       #<Sequel::SQL::Blob:0xe4a944 bytes=122 start="  File \"/o" end="in delete\n"> +
       #<Sequel::SQL::Blob:0xe4a958 bytes=46 start="    delete" end=".delete()\n"> +
       #<Sequel::SQL::Blob:0xe4a96c bytes=125 start="  File \"/o" end="in delete\n"> +
       #<Sequel::SQL::Blob:0xe4a980 bytes=30 start="    signal" end="ete.send(\n"> +
       #<Sequel::SQL::Blob:0xe4a994 bytes=123 start="  File \"/o" end=" __exit__\n"> +
       #<Sequel::SQL::Blob:0xe4a9a8 bytes=24 start="    connec" end=".commit()\n"> +
       #<Sequel::SQL::Blob:0xe4a9bc bytes=118 start="  File \"/o" end=" in inner\n"> +
       #<Sequel::SQL::Blob:0xe4a9d0 bytes=33 start="    return" end="**kwargs)\n"> +
       #<Sequel::SQL::Blob:0xe4a9e4 bytes=128 start="  File \"/o" end="in commit\n"> +
       #<Sequel::SQL::Blob:0xe4a9f8 bytes=19 content="    self._commit()\n"> +
       #<Sequel::SQL::Blob:0xe4aa0c bytes=129 start="  File \"/o" end="n _commit\n"> +
       #<Sequel::SQL::Blob:0xe4aa20 bytes=36 start="    return" end=".commit()\n"> +
       #<Sequel::SQL::Blob:0xe4aa34 bytes=116 start="  File \"/o" end=" __exit__\n"> +
       #<Sequel::SQL::Blob:0xe4aa48 bytes=64 start="    raise " end="exc_value\n"> +
       #<Sequel::SQL::Blob:0xe4aa5c bytes=129 start="  File \"/o" end="n _commit\n"> +
       #<Sequel::SQL::Blob:0xe4aa70 bytes=36 start="    return" end=".commit()\n">,
      "description"=>
       #<Sequel::SQL::Blob:0xe4aa84 bytes=179 start="update or " end="2content\"\n"> +
       #<Sequel::SQL::Blob:0xe4aa98 bytes=129 start="DETAIL:  K" end="content\".\n">},
    "worker"=>"/pulp/api/v3/workers/a602895c-896b-4a7a-98a6-1a8804076a17/",
    "child_tasks"=>[],
    "progress_reports"=>
     [{"message"=>"Clean up orphan Content",
       "code"=>"clean-up.content",
       "state"=>"running",
       "total"=>3536,
       "done"=>2000}],
    "created_resources"=>[],
    "reserved_resources_record"=>[]}],
 "task_groups"=>[],
 "poll_attempts"=>{"total"=>17, "failed"=>1}}
 
Exception:
Katello::Errors::Pulp3Error: update or delete on table "core_content" violates foreign key constraint "pulp_2to3_migration__pulp3_content_id_6271a7bb_fk_core_cont" on table "pulp_2to3_migration_pulp2content"
DETAIL:  Key (pulp_id)=(8da98e4b-2321-40cd-9da5-49299bdf7cf4) is still referenced from table "pulp_2to3_migration_pulp2content".

Backtrace:
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.rc4/app/lib/actions/pulp3/abstract_async_task.rb:108:in `block in check_for_errors'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.rc4/app/lib/actions/pulp3/abstract_async_task.rb:106:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.rc4/app/lib/actions/pulp3/abstract_async_task.rb:106:in `check_for_errors'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.rc4/app/lib/actions/pulp3/abstract_async_task.rb:160:in `poll_external_task'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action/polling.rb:100:in `poll_external_task_with_rescue'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action/polling.rb:22:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action/cancellable.rb:14:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.rc4/app/lib/actions/pulp3/abstract_async_task.rb:10:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action.rb:582:in `block (3 levels) in execute_run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:27:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:19:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:32:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:23:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:27:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:19:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.rc4/app/lib/actions/middleware/remote_action.rb:16:in `block in run'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.rc4/app/lib/actions/middleware/remote_action.rb:40:in `block in as_remote_user'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.rc4/app/models/katello/concerns/user_extensions.rb:21:in `cp_config'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.rc4/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.rc4/app/lib/actions/middleware/remote_action.rb:39:in `as_remote_user'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.rc4/app/lib/actions/middleware/remote_action.rb:16:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:23:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:27:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:19:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/execution_wrapper.rb:88:in `wrap'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:23:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:27:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:19:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action/progress.rb:31:in `with_progress_calculation'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action/progress.rb:17:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:23:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:27:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:19:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/load_setting_values.rb:20:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:23:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:27:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:19:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_request_id.rb:15:in `block in run'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_request_id.rb:52:in `restore_current_request_id'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_request_id.rb:15:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:23:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:27:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:19:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_timezone.rb:15:in `block in run'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_timezone.rb:44:in `restore_curent_timezone'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_timezone.rb:15:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:23:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:27:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:19:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `block in run'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_taxonomies.rb:45:in `restore_current_taxonomies'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:23:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:27:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:19:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:32:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:23:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:27:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware.rb:19:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_user.rb:15:in `block in run'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_user.rb:54:in `restore_curent_user'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-5.2.0/app/lib/actions/middleware/keep_current_user.rb:15:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/stack.rb:23:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/middleware/world.rb:31:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action.rb:581:in `block (2 levels) in execute_run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action.rb:580:in `catch'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action.rb:580:in `block in execute_run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action.rb:483:in `block in with_error_handling'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action.rb:483:in `catch'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action.rb:483:in `with_error_handling'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action.rb:575:in `execute_run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/action.rb:296:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:18:in `block (2 levels) in execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/execution_plan/steps/abstract.rb:167:in `with_meta_calculation'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:17:in `block in execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:32:in `open_action'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:16:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/director.rb:94:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:11:in `block (2 levels) in perform'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/executors.rb:18:in `run_user_code'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:9:in `block in perform'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:25:in `with_telemetry'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/executors/sidekiq/worker_jobs.rb:8:in `perform'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.6.2/lib/dynflow/executors/sidekiq/serialization.rb:27:in `perform'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:192:in `execute_job'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:165:in `block (2 levels) in process'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:164:in `block in process'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:137:in `block (6 levels) in dispatch'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/job_retry.rb:109:in `local'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:136:in `block (5 levels) in dispatch'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq.rb:37:in `block in <module:Sidekiq>'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:132:in `block (4 levels) in dispatch'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:250:in `stats'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:127:in `block (3 levels) in dispatch'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/job_logger.rb:8:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:126:in `block (2 levels) in dispatch'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/job_retry.rb:74:in `global'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:125:in `block in dispatch'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/logging.rb:48:in `with_context'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/logging.rb:42:in `with_job_hash_context'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:124:in `dispatch'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:163:in `process'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:83:in `process_one'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:71:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/util.rb:16:in `watchdog'
/opt/theforeman/tfm/root/usr/share/gems/gems/sidekiq-5.2.7/lib/sidekiq/util.rb:25:in `block in safe_thread'
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

Run

# foreman-maintain content remove-pulp2

to remove the remnants from pulp2 which are still in the database. After that, restart foreman.

# foreman-maintain service stop
# foreman-maintain service start

That fixed the issue on my instance. Thank you!