Issue #1660
Cannot create/update ISO repo without feed
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.8.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
pulp-admin does not allow to create iso repo if you do not provide --feed
$ pulp-admin -vv iso repo create --repo-id test-iso
2016-02-11 12:42:02,707 - DEBUG - sending POST request to /pulp/api/v2/repositories/
2016-02-11 12:42:03,038 - INFO - POST request to /pulp/api/v2/repositories/ with parameters {"display_name": null, "description": null, "distributors": [{"distributor_id": "iso_distributor", "distributor_type_id": "iso_distributor", "distributor_config": {}, "auto_publish": true}], "notes": {"_repo-type": "iso-repo"}, "importer_type_id": "iso_importer", "importer_config": {}, "id": "test-iso"}
2016-02-11 12:42:03,039 - INFO - Response status : 400
2016-02-11 12:42:03,039 - INFO - Response body :
{
"exception": null,
"args": [],
"_href": "/pulp/api/v2/repositories/",
"traceback": null,
"error_message": "A validation error occurred.",
"http_request_method": "POST",
"http_status": 400,
"error": {
"code": "PLP1000",
"data": {
"validation_errors": "The configuration parameter <feed> is required when any of the following other parameters are defined: max_speed, max_downloads, proxy_password, proxy_port, proxy_host, proxy_username, remove_missing, ssl_ca_cert, ssl_client_cert, ssl_client_key, validate."
},
"description": "A validation error occurred.",
"sub_errors": []
}
}
2016-02-11 12:42:03,039 - ERROR - Exception occurred:
href: /pulp/api/v2/repositories/
method: POST
status: 400
error: A validation error occurred.
traceback: None
data: {u'args': [], u'error': {u'code': u'PLP1000', u'data': {u'validation_errors': u'The configuration parameter <feed> is required when any of the following other parameters are defined: max_speed, max_downloads, proxy_password, proxy_port, proxy_host, proxy_username, remove_missing, ssl_ca_cert, ssl_client_cert, ssl_client_key, validate.'}, u'description': u'A validation error occurred.', u'sub_errors': []}}
A validation error occurred.
Same for ISO repo update:
$ pulp-admin iso repo create --repo-id iso --feed https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/test_file_repo/ --download-policy on_demand
Successfully created repository [iso]
[ipanova@ina pulp]$ pulp-admin -vv iso repo update --repo-id iso --download-policy=immediate
2016-02-11 12:43:20,187 - DEBUG - sending PUT request to /pulp/api/v2/repositories/iso/
2016-02-11 12:43:20,301 - INFO - PUT request to /pulp/api/v2/repositories/iso/ with parameters {"importer_config": {"download_policy": "immediate"}, "distributor_configs": {"iso_distributor": {}}, "delta": {"notes": {"_repo-type": "iso-repo"}}}
2016-02-11 12:43:20,302 - INFO - Response status : 400
2016-02-11 12:43:20,302 - INFO - Response body :
{
"exception": null,
"args": [],
"_href": "/pulp/api/v2/repositories/iso/",
"traceback": null,
"error_message": "A validation error occurred.",
"http_request_method": "PUT",
"http_status": 400,
"error": {
"code": "PLP1000",
"data": {
"validation_errors": "The configuration parameter <feed> is required when any of the following other parameters are defined: max_speed, max_downloads, proxy_password, proxy_port, proxy_host, proxy_username, remove_missing, ssl_ca_cert, ssl_client_cert, ssl_client_key, validate."
},
"description": "A validation error occurred.",
"sub_errors": []
}
}
2016-02-11 12:43:20,302 - ERROR - Exception occurred:
href: /pulp/api/v2/repositories/iso/
method: PUT
status: 400
error: A validation error occurred.
traceback: None
data: {u'args': [], u'error': {u'code': u'PLP1000', u'data': {u'validation_errors': u'The configuration parameter <feed> is required when any of the following other parameters are defined: max_speed, max_downloads, proxy_password, proxy_port, proxy_host, proxy_username, remove_missing, ssl_ca_cert, ssl_client_cert, ssl_client_key, validate.'}, u'description': u'A validation error occurred.', u'sub_errors': []}}
A validation error occurred.
Associated revisions
History
#1
Updated by ipanova@redhat.com almost 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
#2
Updated by ipanova@redhat.com almost 5 years ago
- Status changed from ASSIGNED to POST
#4
Updated by rbarlow almost 5 years ago
Hello Ina!
I'm not opposed to the fix you are proposing for this issue, but I wanted to add that this may be happening due to the defaults, either in the importer config file or the coded defaults. On one hand, it does kind of make sense to error if the user provides a max_speed without a feed, but on the other hand that would probably be painful for users who want to provide defaults in the config file. Now that I think about it, your fix does make a lot of sense ☺
#5
Updated by rbarlow almost 5 years ago
- Platform Release set to 2.8.0
#6
Updated by ipanova@redhat.com almost 5 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 983d412a3d4ad4a8205544d76bf5fd0d122b022b.
#7
Updated by bmbouter almost 5 years ago
- Triaged changed from No to Yes
#8
Updated by dkliban@redhat.com almost 5 years ago
- Status changed from MODIFIED to 5
#9
Updated by dkliban@redhat.com almost 5 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
#10
Updated by bmbouter almost 2 years ago
- Tags Pulp 2 added
Please register to edit this issue
1660 - Cannot create/update ISO repo without feed.
closes #1660 https://pulp.plan.io/issues/1660