Description of problem: If the distributor_id does not match the distributor_type_id ('yum_distributor') then the auto-detection of a sha1 upstream repo does not cause the repo's distributor to have its config set to 'sha1'. It is not set to anything. Version-Release number of selected component (if applicable): 2.3.1-0.3 How reproducible: Always Steps to Reproduce: 1. Create a yum repository and ensure that its yum_distributor's id is something other than "yum_distributor". Point the feed url to rhel 5 repo that uses sha1 2. Sync & publish the repo 3. Check the checksum type on the repo Actual results: Checksum type is not set Expected results: Checksum type should be set to 'sha1'
PR: https://bugzilla.redhat.com/show_bug.cgi?id=1038309
Actual PR link: https://github.com/pulp/pulp_rpm/pull/408
build: 2.3.1-0.4.beta
To verify this you will need to create a distributor on a repository with a different id than the distributor type. Two possible ways to do this. 1) Create a new repo using the command line that has a feed to a rhel5 repo 2) Find the yum_distributor in the mongo database repo_distributors collection 3) Update the id field of the distributor to be something other than "yum_distributor" 4) Sync the repository 5) Publish the repository 5) Go back to the mongo database and verify that the checksum type has been specified on the distributor that was modified in step 3 Second option is to use the rest API to create the repository and the distributor directly while specifying something other than "yum_distributor" as the id of the yum distributor.
Here is the PIC command pic.POST('/v2/repositories/', {"distributors": [{"distributor_id": "distid", "auto_publish": True, "distributor_type": "yum_distributor", "distributor_config": {"skip": ["rpm"], "http": False, "relative_url": "rhel5", "https": True}}, {"distributor_id": "export_distributor", "auto_publish": False, "distributor_type": "export_distributor", "distributor_config": {"skip": ["rpm"], "http": False, "https": True}}], "notes": {"_repo-type": "rpm-repo"}, "importer_type_id": "yum_importer", "importer_config": {"feed": "http://download.devel.redhat.com/cds/prod/content/dist/rhel/server/5/5.10/x86_64/os/", "validate": True, "type_skip_list": ["rpm"]}, "id": "rhel5"} )
In [3]: pic.POST('/v2/repositories/', {"distributors": [{"distributor_id": "distid", "auto_publish": True, "distributor_type": "yum_distributor", "distributor_config": {"skip": ["rpm"], "http": False, "relative_url": "rhel5", "https": True}}, {"distributor_id": "export_distributor", "auto_publish": False, "distributor_type": "export_distributor", "distributor_config": {"skip": ["rpm"], "http": False, "https": True}}], "notes": {"_repo-type": "rpm-repo"}, "importer_type_id": "yum_importer", "importer_config": {"feed": "http://download.devel.redhat.com/cds/prod/content/dist/rhel/server/5/5.10/x86_64/os/", "validate": True, "type_skip_list": ["rpm"]}, "id": "rhel5"} ) Request Body { "notes": { "_repo-type": "rpm-repo" }, "importer_type_id": "yum_importer", "importer_config": { "feed": "http://download.devel.redhat.com/cds/prod/content/dist/rhel/server/5/5.10/x86_64/os/", "validate": true, "type_skip_list": [ "rpm" ] }, "id": "rhel5", "distributors": [ { "distributor_id": "distid", "auto_publish": true, "distributor_type": "yum_distributor", "distributor_config": { "skip": [ "rpm" ], "http": false, "https": true, "relative_url": "rhel5" } }, { "distributor_id": "export_distributor", "auto_publish": false, "distributor_type": "export_distributor", "distributor_config": { "skip": [ "rpm" ], "http": false, "https": true } } ] } Response Body { "scratchpad": {}, "display_name": "rhel5", "description": null, "_ns": "repos", "notes": { "_repo-type": "rpm-repo" }, "content_unit_counts": {}, "_id": { "$oid": "52a72a3dd669f05eaa8cc561" }, "id": "rhel5", "_href": "/pulp/api/v2/repositories/rhel5/" } Out[3]: (201, {u'_href': u'/pulp/api/v2/repositories/rhel5/', u'_id': {u'$oid': u'52a72a3dd669f05eaa8cc561'}, u'_ns': u'repos', u'content_unit_counts': {}, u'description': None, u'display_name': u'rhel5', u'id': u'rhel5', u'notes': {u'_repo-type': u'rpm-repo'}, u'scratchpad': {}}) [root@pulp-v2-server ~]# pulp-admin rpm repo sync run --repo-id rhel5 +----------------------------------------------------------------------+ Synchronizing Repository [rhel5] +----------------------------------------------------------------------+ This command may be exited by pressing ctrl+c without affecting the actual operation on the server. Downloading metadata... [/] ... completed Downloading repository content... [==================================================] 100% RPMs: 0/0 items Delta RPMs: 0/0 items ... completed Downloading distribution files... [==================================================] 100% Distributions: 19/19 items ... completed Importing errata... [/] ... completed Importing package groups/categories... [\] ... completed [root@pulp-v2-server ~]# pulp-admin repo list --details +----------------------------------------------------------------------+ Repositories +----------------------------------------------------------------------+ Id: rhel5 Display Name: rhel5 Description: None Content Unit Counts: Distribution: 1 Erratum: 2863 Package Category: 6 Package Group: 99 Yum Repo Metadata File: 1 Notes: Importers: Config: Feed: http://download.devel.redhat.com/cds/prod/content/dist/rhel/ server/5/5.10/x86_64/os/ Type Skip List: rpm Validate: True Id: yum_importer Importer Type Id: yum_importer Last Sync: 2013-12-10T09:59:00-05:00 Repo Id: rhel5 Scheduled Syncs: Distributors: Auto Publish: False Config: Http: False Https: True Skip: rpm Distributor Type Id: export_distributor Id: export_distributor Last Publish: None Repo Id: rhel5 Scheduled Publishes: Auto Publish: True Config: Checksum Type: sha1 Http: False Https: True Relative URL: rhel5 Skip: rpm Distributor Type Id: yum_distributor Id: distid Last Publish: 2013-12-10T09:59:05-05:00 Repo Id: rhel5 Scheduled Publishes: [root@pulp-v2-server ~]#
verified [root@pulp-v2-server ~]# rpm -qa pulp-server pulp-server-2.3.1-0.4.beta.el6.noarch [root@pulp-v2-server ~]#
Also bound the repo to the consumer. In [6]: pic.POST('/v2/consumers/client/bindings/',body={'repo_id':'rhel5', 'distributor_id': 'distid' }) Request Body { "repo_id": "rhel5", "distributor_id": "distid" } Response Body [ { "task_group_id": "986aa03f-37cb-40be-839c-e464abc8bf02", "call_request_id": "dc1ecc6d-43ab-4b2f-96b9-d01d9fc72a6e", "exception": null, "_href": "/pulp/api/v2/task_groups/986aa03f-37cb-40be-839c-e464abc8bf02/", "task_id": "dc1ecc6d-43ab-4b2f-96b9-d01d9fc72a6e", "call_request_tags": [ "pulp:consumer:client", "pulp:repository:rhel5", "pulp:repository_distributor:distid", "pulp:action:bind" ], "reasons": [], "start_time": null, "traceback": null, "schedule_id": null, "finish_time": null, "state": "waiting", "result": null, "dependency_failures": {}, "call_request_group_id": "986aa03f-37cb-40be-839c-e464abc8bf02", "progress": {}, "principal_login": "admin", "response": "accepted", "tags": [ "pulp:consumer:client", "pulp:repository:rhel5", "pulp:repository_distributor:distid", "pulp:action:bind" ] }, { "task_group_id": "986aa03f-37cb-40be-839c-e464abc8bf02", "call_request_id": "5ba582cf-5863-4b34-9021-2e0dcdad5d47", "exception": null, "_href": "/pulp/api/v2/task_groups/986aa03f-37cb-40be-839c-e464abc8bf02/", "task_id": "5ba582cf-5863-4b34-9021-2e0dcdad5d47", "call_request_tags": [ "pulp:consumer:client", "pulp:repository:rhel5", "pulp:repository_distributor:distid", "pulp:action:agent_bind" ], "reasons": [], "start_time": null, "traceback": null, "schedule_id": null, "finish_time": null, "state": "waiting", "result": null, "dependency_failures": {}, "call_request_group_id": "986aa03f-37cb-40be-839c-e464abc8bf02", "progress": {}, "principal_login": "admin", "response": "accepted", "tags": [ "pulp:consumer:client", "pulp:repository:rhel5", "pulp:repository_distributor:distid", "pulp:action:agent_bind" ] } ] Out[6]: (202, [{u'_href': u'/pulp/api/v2/task_groups/986aa03f-37cb-40be-839c-e464abc8bf02/', u'call_request_group_id': u'986aa03f-37cb-40be-839c-e464abc8bf02', u'call_request_id': u'dc1ecc6d-43ab-4b2f-96b9-d01d9fc72a6e', u'call_request_tags': [u'pulp:consumer:client', u'pulp:repository:rhel5', u'pulp:repository_distributor:distid', u'pulp:action:bind'], u'dependency_failures': {}, u'exception': None, u'finish_time': None, u'principal_login': u'admin', u'progress': {}, u'reasons': [], u'response': u'accepted', u'result': None, u'schedule_id': None, u'start_time': None, u'state': u'waiting', u'tags': [u'pulp:consumer:client', u'pulp:repository:rhel5', u'pulp:repository_distributor:distid', u'pulp:action:bind'], u'task_group_id': u'986aa03f-37cb-40be-839c-e464abc8bf02', u'task_id': u'dc1ecc6d-43ab-4b2f-96b9-d01d9fc72a6e', u'traceback': None}, {u'_href': u'/pulp/api/v2/task_groups/986aa03f-37cb-40be-839c-e464abc8bf02/', u'call_request_group_id': u'986aa03f-37cb-40be-839c-e464abc8bf02', u'call_request_id': u'5ba582cf-5863-4b34-9021-2e0dcdad5d47', u'call_request_tags': [u'pulp:consumer:client', u'pulp:repository:rhel5', u'pulp:repository_distributor:distid', u'pulp:action:agent_bind'], u'dependency_failures': {}, u'exception': None, u'finish_time': None, u'principal_login': u'admin', u'progress': {}, u'reasons': [], u'response': u'accepted', u'result': None, u'schedule_id': None, u'start_time': None, u'state': u'waiting', u'tags': [u'pulp:consumer:client', u'pulp:repository:rhel5', u'pulp:repository_distributor:distid', u'pulp:action:agent_bind'], u'task_group_id': u'986aa03f-37cb-40be-839c-e464abc8bf02', u'task_id': u'5ba582cf-5863-4b34-9021-2e0dcdad5d47', u'traceback': None}]) In [7]:
These were already verified in the corresponding releases that they were fixed in. Moving them to closed current release.