Project

Profile

Help

Issue #1439

closed

Adding puppet_file_distributor to puppet repository fails

Added by placko over 8 years ago. Updated almost 4 years ago.

Status:
CLOSED - WORKSFORME
Priority:
High
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
2.8.0
OS:
RHEL 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

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

Also available in: Atom PDF