Issue #484
closedUpdating a yum importer behaves differently than updating a yum distributor
Description
Description of problem: When I pass nonsense keys to the yum importer, it happily takes them. When I do the same thing to the distributor, it results in a traceback.
Version-Release number of selected component (if applicable): master
How reproducible: always
Steps to Reproduce:
1. Create a test repository: pulp-admin rpm repo create --repo-id zoo --feed https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
2. Update the distributor: curl -i -H "Accept: application/json" -X PUT -d '{ "distributor_config": {"NOTAKEY":"NOTAVALUE"}}' -u admin:admin -k 'https://localhost/pulp/api/v2/repositories/zoo/distributors/yum_distributor/'
3. Retrieve the resulting task: curl -i -H "Accept: application/json" -X GET -u admin:admin -k 'https://localhost/pulp/api/v2/tasks/\<task-id>/'
4. Update the importer: curl -i -H "Accept: application/json" -X PUT -d '{ "importer_config": {"NOTAKEY":"NOTAVALUE"}}' -u admin:admin -k 'https://localhost/pulp/api/v2/repositories/zoo/importers/yum_importer/'
5. Retrieve the resulting task: curl -i -H "Accept: application/json" -X GET -u admin:admin -k 'https://localhost/pulp/api/v2/tasks/\<task-id>/'
Actual results:
Distributor results:
{
"_href": "/pulp/api/v2/tasks/52d953d4-3d7c-4b5e-8b15-02c0bf84ae05/",
"_id": {
"$oid": "53e3a2cab53073e66875f0ed"
},
"_ns": "task_status",
"error": {
"code": "PLP0000",
"data": {},
"description": "Configuration key [NOTAKEY] is not supported",
"sub_errors": []
},
"exception": null,
"finish_time": "2014-08-07T16:01:14Z",
"id": "53e3a2ca7bc8f6604cd176ca",
"progress_report": {},
"queue": "reserved_resource_worker-4@jcline.redhat.com.dq",
"result": null,
"spawned_tasks": [],
"start_time": "2014-08-07T16:01:14Z",
"state": "error",
"tags": [
"pulp:repository:zoo",
"pulp:repository_distributor:yum_distributor",
"pulp:action:update_distributor"
],
"task_id": "52d953d4-3d7c-4b5e-8b15-02c0bf84ae05",
"task_type": "pulp.server.tasks.repository.distributor_update",
"traceback": "Traceback (most recent call last):\n File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 240, in trace_task\n R = retval = fun(*args, **kwargs)\n File \"/home/jcline/devel/pulp/server/pulp/server/async/tasks.py\", line 306, in call\n return super(Task, self).__call__(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 437, in protected_call\n return self.run(*args, **kwargs)\n File \"/home/jcline/devel/pulp/server/pulp/server/tasks/repository.py\", line 143, in distributor_update\n distributor = manager.update_distributor_config(repo_id, distributor_id, config, auto_publish)\n File \"/home/jcline/devel/pulp/server/pulp/server/managers/repo/distributor.py\", line 333, in update_distributor_config\n raise PulpDataException(message)\nPulpDataException: Configuration key [NOTAKEY] is not supported\n"
}
Importer results:
{
"_href": "/pulp/api/v2/tasks/cb0d38a4-d11f-4bb9-8dd1-dccf5163e33c/",
"_id": {
"$oid": "53e3a275b53073e66875f0ec"
},
"_ns": "task_status",
"error": null,
"exception": null,
"finish_time": "2014-08-07T15:59:49Z",
"id": "53e3a2757bc8f6604cd176c9",
"progress_report": {},
"queue": "reserved_resource_worker-2@jcline.redhat.com.dq",
"result": {
"_id": {
"$oid": "53e267d17bc8f602856d69c0"
},
"_ns": "repo_importers",
"config": {
"NOTAKEY": "NOTAVALUE",
"feed": "https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/"
},
"id": "yum_importer",
"importer_type_id": "yum_importer",
"last_sync": "2014-08-06T20:11:47Z",
"repo_id": "zoo",
"scheduled_syncs": [],
"scratchpad": null
},
"spawned_tasks": [],
"start_time": "2014-08-07T15:59:49Z",
"state": "finished",
"tags": [
"pulp:repository:zoo",
"pulp:repository_importer:yum_importer",
"pulp:action:update_importer"
],
"task_id": "cb0d38a4-d11f-4bb9-8dd1-dccf5163e33c",
"task_type": "pulp.server.managers.repo.importer.update_importer_config",
"traceback": null
}
Expected results: Either both accept unused keys, or both do not.
Additional info:
+ This bug was cloned from Bugzilla Bug #1127861 +
Updated by bmbouter almost 4 years ago
- Status changed from NEW to CLOSED - WONTFIX
- Severity set to 2. Medium
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.
Use proper 2to3 uniqueness constraints for deb
closes #484 https://github.com/pulp/pulp-2to3-migration/issues/484
Previously the uniqueness constraints allowed for only one 2to3 unit per Pulp 3 unit to be created. This causes problems when there is more than one Pulp 2 unit that map onto the same Pulp 3 unit to be created. If prevents the resultant Pulp 3 unit from being added to every repo it belongs in.