Skip to content

Instantly share code, notes, and snippets.

@johnpmitsch
Last active January 10, 2020 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnpmitsch/e7aeeb6b518ef09feac7261058d0ee1e to your computer and use it in GitHub Desktop.
Save johnpmitsch/e7aeeb6b518ef09feac7261058d0ee1e to your computer and use it in GitHub Desktop.
pulp dep solving

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1784165

I publish a Content View (pulp 2 repository) and use conservative dependency solving. The content view has this repo synced https://inecas.fedorapeople.org/fakerepos/zoo3 and we are trying to filter out specific walrus versions

The metadata from https://inecas.fedorapeople.org/fakerepos/zoo/repodata/be20ece13e6c21b132667ddcaa4d7ad0b32e470b9917aba51979e0707116280d-primary.xml.gz shows that chimpanzee requires walrus (see under rpm:requires) and it doesn't have a specific version requirement.

In satellite 6.6:

I can filter both walrus 0.71 and walrus 5.21 and they will stay filtered even with dependency solving turned on, since only one is needed to fufill the dependency

versions in 6.6:

[vagrant@sat-6-6-qa-rhel7 ~]$ rpm -qa | grep pulp-server
pulp-server-2.19.1.1-1.el7sat.noarch
[vagrant@sat-6-6-qa-rhel7 ~]$ rpm -qa | grep pulp-rpm
python-pulp-rpm-common-2.19.1.1-2.el7sat.noarch
pulp-rpm-plugins-2.19.1.1-2.el7sat.noarch

In upstream and 6.7 builds:

When "walrus-5.21" is filtered, "walrus-5.21" is pulled in, despite "walrus-0.71" existing in the content view. "walrus-0.71" should have been enough to fill the requirement.

However, when "walrus-0.71" is filtered, it stays filtered. So it appears that the latest version of the required package is pulled into the content view despite using conservative dep solving

The API calls to pulp show 'recursive_conservative' still being passed:

2020-01-10T15:09:49 [D|kat|aa52bf7e] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-cv2-v4_0-54477311-33ef-4ae4-8fd8-ffb684dcc331/actions/associate/: {"source_repo_id":"54477311-33ef-4ae4-8fd8-ffb684dcc331","criteria":{"type_ids":["rpm"],"filters":{"unit":{"$and":[{"is_modular":false},{"filename":{"$exists":true}}]}},"fields":{"unit":["name","epoch","version","release","arch","checksumtype","checksum"]}},"override_config":{"recursive_conservative":true,"additional_repos":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T15:09:49 [D|kat|aa52bf7e] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-cv2-v4_0-54477311-33ef-4ae4-8fd8-ffb684dcc331/actions/associate/: {"source_repo_id":"54477311-33ef-4ae4-8fd8-ffb684dcc331","criteria":{"type_ids":["modulemd"],"filters":{}},"override_config":{"recursive_conservative":true,"additional_repos":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T15:13:06 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-cv2-v5_0-54477311-33ef-4ae4-8fd8-ffb684dcc331/actions/associate/: {"source_repo_id":"54477311-33ef-4ae4-8fd8-ffb684dcc331","criteria":{"type_ids":["rpm"],"filters":{"unit":{"$and":[{"is_modular":false},{"filename":{"$exists":true}}]}},"fields":{"unit":["name","epoch","version","release","arch","checksumtype","checksum"]}},"override_config":{"recursive_conservative":true,"additional_repos":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T15:31:09 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-cv2-v5_0-54477311-33ef-4ae4-8fd8-ffb684dcc331/actions/associate/: {"source_repo_id":"54477311-33ef-4ae4-8fd8-ffb684dcc331","criteria":{"type_ids":["rpm"],"filters":{"unit":{"$and":[{"is_modular":false},{"filename":{"$exists":true}}]}},"fields":{"unit":["name","epoch","version","release","arch","checksumtype","checksum"]}},"override_config":{"recursive_conservative":true,"additional_repos":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T15:31:09 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-cv2-v5_0-54477311-33ef-4ae4-8fd8-ffb684dcc331/actions/associate/: {"source_repo_id":"54477311-33ef-4ae4-8fd8-ffb684dcc331","criteria":{"type_ids":["modulemd"],"filters":{}},"override_config":{"recursive_conservative":true,"additional_repos":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T15:33:20 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-cv2-v6_0-54477311-33ef-4ae4-8fd8-ffb684dcc331/actions/associate/: {"source_repo_id":"54477311-33ef-4ae4-8fd8-ffb684dcc331","criteria":{"type_ids":["rpm"],"filters":{"unit":{"$and":[{"is_modular":false},{"filename":{"$exists":true}}]}},"fields":{"unit":["name","epoch","version","release","arch","checksumtype","checksum"]}},"override_config":{"recursive_conservative":true,"additional_repos":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T15:33:20 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-cv2-v6_0-54477311-33ef-4ae4-8fd8-ffb684dcc331/actions/associate/: {"source_repo_id":"54477311-33ef-4ae4-8fd8-ffb684dcc331","criteria":{"type_ids":["modulemd"],"filters":{}},"override_config":{"recursive_conservative":true,"additional_repos":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}

versions used in upstream:

[vagrant@centos7-katello-devel-stable foreman{develop}]$ rpm -qa | grep pulp-server
pulp-server-2.21.0-1.el7.noarch
[vagrant@centos7-katello-devel-stable foreman{develop}]$ rpm -qa | grep pulp-rpm
pulp-rpm-plugins-2.21.0-1.el7.noarch
python-pulp-rpm-common-2.21.0-1.el7.noarch
pulp-rpm-admin-extensions-2.21.0-1.el7.noarch

Some more detailed logs:

Filtering walrus-0.71 (is successfully filtered)
 
[vagrant@centos7-katello-devel-stable foreman{develop}]$ tail -n 1000 log/development.log | grep associate
2020-01-10T17:59:05 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v3_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source
_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["rpm"],"filters":{"unit":{"$and":[{"is_modular":false},{"$and":[{"filename":{"$exists":true}},{"$nor":[{"$or":[{"
filename":{"$in":["walrus-0.71-1.noarch.rpm"]}}]}]}]}]}},"fields":{"unit":["name","epoch","version","release","arch","checksumtype","checksum"]}},"override_config":{"recursive_conservati
ve":true,"additional_repos":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T17:59:05 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v3_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/unassociate/: {"crit
eria":{"type_ids":["rpm"],"filters":{"unit":{"filters":{"unit":{"$and":[{"is_modular":false},{"$or":[{"filename":{"$in":["walrus-0.71-1.noarch.rpm"]}}]}]}}}}}}: {"content_type"=>"applica
tion/json", "accept"=>"application/json"}
2020-01-10T17:59:05 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v3_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source
_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["modulemd"],"filters":{}},"override_config":{"recursive_conservative":true,"additional_repos":{}}}: {"content_typ
e"=>"application/json", "accept"=>"application/json"}
2020-01-10T17:59:05 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v3_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source
_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["srpm"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T17:59:05 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v3_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source
_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["erratum"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T17:59:05 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v3_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source
_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["package_group"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T17:59:05 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v3_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source
_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["package_environment"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T17:59:05 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v3_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source
_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["yum_repo_metadata_file"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T17:59:06 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v3_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source
_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["distribution"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T17:59:06 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v3_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source
_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["modulemd_defaults"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
 
 
Filtering walrus-5.21 (is not filtered)
 
2020-01-10T18:01:45 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v4_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["rpm"],"filters":{"unit":{"$and":[{"is_modular":false},{"$and":[{"filename":{"$exists":true}},{"$nor":[{"$or":[{"filename":{"$in":["walrus-5.21-1.noarch.rpm"]}}]}]}]}]}},"fields":{"unit":["name","epoch","version","release","arch","checksumtype","checksum"]}},"override_config":{"recursive_conservative":true,"additional_repos":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T18:01:45 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v4_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/unassociate/: {"criteria":{"type_ids":["rpm"],"filters":{"unit":{"filters":{"unit":{"$and":[{"is_modular":false},{"$or":[{"filename":{"$in":["walrus-5.21-1.noarch.rpm"]}}]}]}}}}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T18:01:45 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v4_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["modulemd"],"filters":{}},"override_config":{"recursive_conservative":true,"additional_repos":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T18:01:45 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v4_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["srpm"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T18:01:45 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v4_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["erratum"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T18:01:45 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v4_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["package_group"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T18:01:45 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v4_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["package_environment"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T18:01:45 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v4_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["yum_repo_metadata_file"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T18:01:46 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v4_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["distribution"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
2020-01-10T18:01:46 [D|kat|] POST: https://centos7-katello-devel-stable.example.com/pulp/api/v2/repositories/1-zoo3-v4_0-77a3e7f8-9c55-4799-9580-df8583d3d556/actions/associate/: {"source_repo_id":"77a3e7f8-9c55-4799-9580-df8583d3d556","criteria":{"type_ids":["modulemd_defaults"],"filters":{}}}: {"content_type"=>"application/json", "accept"=>"application/json"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment