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

Actions #1

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
Actions #2

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": {}
}
Actions #3

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added
Actions #4

Updated by bmbouter almost 4 years ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Also available in: Atom PDF