Issue #1439
closedAdding puppet_file_distributor to puppet repository fails
Description
Following command fails when publish directory /var/lib/pulp/published/puppet/files
does not exists on server (by default it doesnt, fails probably on [1]). After creating this directory, command finish as expected. If this is intended behaviour (which I don't think it is), then documentation [2] should be modified accordingly.
$ http --verify no --auth admin:admin POST https://server/pulp/api/v2/repositories/repo_id/distributors/ distributor_type_id=puppet_file_distributor distributor_id=asdf
HTTP/1.1 400 Bad Request
Connection: close
Content-Encoding: utf-8
Content-Length: 604
Content-Type: application/json
Date: Fri, 18 Dec 2015 11:34:58 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
{
"_href": "/pulp/api/v2/repositories/0686f99e-5455-4bc7-878b-f37dc2f2d8bd/distributors/",
"args": [
"The directory specified for the puppet file distributor is invalid: /var/lib/pulp/published/puppet/files"
],
"error": {
"code": "PLP0000",
"data": {},
"description": "The directory specified for the puppet file distributor is invalid: /var/lib/pulp/published/puppet/files",
"sub_errors": []
},
"error_message": "The directory specified for the puppet file distributor is invalid: /var/lib/pulp/published/puppet/files",
"exception": null,
"http_request_method": "POST",
"http_status": 400,
"traceback": null
}
[1] https://github.com/pulp/pulp_puppet/blob/b780d413ac38b70e8538f2bea41be436b20d548e/pulp_puppet_plugins/pulp_puppet/plugins/distributors/filedistributor.py#L57
[2] http://pulp-puppet.readthedocs.org/en/latest/tech-reference/plugin_conf.html#file-distributor
Updated by mhrivnak over 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to dkliban@redhat.com
- Priority changed from Normal to High
- Platform Release set to 2.8.0
- Triaged changed from No to Yes
Updated by dkliban@redhat.com over 8 years ago
- Status changed from ASSIGNED to CLOSED - WORKSFORME
Just tested this with the latest changes in master branch and could not reproduce.
[fedora@pulp-fedora23 pulp_smash]$ pulp-admin puppet repo create --repo-id myrepo
Successfully created repository [myrepo]
[fedora@pulp-fedora23 pulp_smash]$ http --verify no --auth admin:admin POST https://localhost/pulp/api/v2/repositories/myrepo/distributors/ distributor_type_id=puppet_file_distributor distributor_id=asdf
HTTP/1.1 201 CREATED
Connection: Keep-Alive
Content-Length: 299
Content-Type: application/json; charset=utf-8
Date: Fri, 18 Dec 2015 18:00:28 GMT
Keep-Alive: timeout=5, max=100
Location: https://localhost/pulp/api/v2/repositories/myrepo/distributors/asdf/
Server: Apache/2.4.17 (Fedora) OpenSSL/1.0.2e-fips mod_wsgi/4.4.8 Python/2.7.10
{
"_href": "/pulp/api/v2/repositories/myrepo/distributors/asdf/",
"_id": {
"$oid": "567449bcfd6db86332921341"
},
"_ns": "repo_distributors",
"auto_publish": false,
"config": {},
"distributor_type_id": "puppet_file_distributor",
"id": "asdf",
"last_publish": null,
"repo_id": "myrepo",
"scratchpad": {}
}
Updated by bmbouter almost 4 years ago
- Category deleted (
14)
We are removing the 'API' category per open floor discussion June 16, 2020.