Regression in regenerate applicability
Looks like there is a regression for the following commit
The following 2 lines are inconsistent which is causing that the regenerate applicability and the retrieval of the applicability to use the different all_profiles_hash to look for profile.
This is excluding the empty profile https://github.com/pulp/pulp/commit/0016f7ba16e1e3eae983527f98c6a662132894dd#diff-497c4c3e2dfb13249190d0776ea94a5eR347
This is not excluding the empty profile https://github.com/pulp/pulp/commit/0016f7ba16e1e3eae983527f98c6a662132894dd#diff-497c4c3e2dfb13249190d0776ea94a5eL705
How to reproduce the issue:
- Make sure everything is clean by deleting orphaned repo profile applicability
celery -A pulp.server.async.app call pulp.server.maintenance.monthly.queue_monthly_maintenance
- Register a consumer and subscribe it to a repo. The consumer should have some applicable errata.
$subscription-manager repos --enable rhel-7-server-rpms
$subscription-manager repos --list
Repo ID: rhel-7-server-rpms Repo Name: Red Hat Enterprise Linux 7 Server (RPMs) Repo URL: https://mysatellite.fqdn/pulp/repos/redhat/Library/content/dist/rhel/server/7/$releasever/$basearch/os Enabled: 1
$ yum list-sec rhel-7-server-rpms
- Trigger the regenerate applicability for repos and wait for the task to finish.
Task pulp.server.managers.consumer.applicability.batch_regenerate_applicability[af5ff301-fbd6-4b6c-9828-ceaeeca52049] succeeded in ..
- Empty applicable errata:
pp Katello.pulp_server.extensions.consumer.applicable_errata(["<consumer_uuid>"]).to_a