[Pulp-list] Create distribution issues

Heide, Todd Todd.Heide at sccompanies.com
Tue May 5 14:39:35 UTC 2020


New install of 3.3.0 and I can create the repo, 

# http POST http://localhost:24817/pulp/api/v3/repositories/file/file/ name=foo
HTTP/1.1 201 Created
Allow: GET, POST, HEAD, OPTIONS
Connection: close
Content-Length: 376
Content-Type: application/json
Date: Tue, 05 May 2020 14:04:24 GMT
Location: /pulp/api/v3/repositories/file/file/7885baed-b707-4002-b1e1-a98924e39ee5/
Server: gunicorn/20.0.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "description": null,
    "latest_version_href": "/pulp/api/v3/repositories/file/file/7885baed-b707-4002-b1e1-a98924e39ee5/versions/0/",
    "name": "foo",
    "pulp_created": "2020-05-05T14:04:24.441705Z",
    "pulp_href": "/pulp/api/v3/repositories/file/file/7885baed-b707-4002-b1e1-a98924e39ee5/",
    "versions_href": "/pulp/api/v3/repositories/file/file/7885baed-b707-4002-b1e1-a98924e39ee5/versions/"
}

Export the repo
# export REPO_HREF=$(http :24817/pulp/api/v3/repositories/file/file/ | jq -r '.results[] | select(.name == "foo") | .pulp_href')

But when I try to make the distribution it errors 404

# http POST :24817/pulp/api/v3/distributions/file/file/ name='baz' base_path='mypath' repository=$REPO_HREF``
HTTP/1.1 400 Bad Request
Allow: GET, POST, HEAD, OPTIONS
Connection: close
Content-Length: 35
Content-Type: application/json
Date: Tue, 05 May 2020 14:05:41 GMT
Server: gunicorn/20.0.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "repository": [
        "Unexpected field"
    ]
}

Did something get missed during the install?   I also tried manual distribution, fails at AnsibleRemote
http POST :24817/pulp/api/v3/remotes/ansible/ansible/ name=bar url='https://galaxy.ansible.com/api/v1/roles/?
> namespace__name=elastic'
HTTP/1.1 404 Not Found
Connection: close
Content-Length: 77
Content-Type: text/html
Date: Tue, 05 May 2020 14:23:20 GMT
Server: gunicorn/20.0.4
X-Frame-Options: SAMEORIGIN

<h1>Not Found</h1><p>The requested resource was not found on this server.</p>

# http POST :24817/pulp/api/v3/distributions/file/file/ name='baz' base_path='dev' repository_version=REPO_VERSION_HREF
HTTP/1.1 400 Bad Request
Allow: GET, POST, HEAD, OPTIONS
Connection: close
Content-Length: 43
Content-Type: application/json
Date: Tue, 05 May 2020 14:24:42 GMT
Server: gunicorn/20.0.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "repository_version": [
        "Unexpected field"
    ]
}

The only one that seemed to have done anything is manual distribution. 

# http POST :24817/pulp/api/v3/distributions/file/file/ name='baz' base_path='bar' publication=$PUBLICATION_HREF
HTTP/1.1 202 Accepted
Allow: GET, POST, HEAD, OPTIONS
Connection: close
Content-Length: 67
Content-Type: application/json
Date: Tue, 05 May 2020 14:35:20 GMT
Server: gunicorn/20.0.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "task": "/pulp/api/v3/tasks/4c752d6b-9102-4105-b84c-7b523439914a/"
}


So out of the three on this page, https://docs.pulpproject.org/workflows/exposing-content.html the only one to work is manual distribution of a publication. I can view and download from the web page.   Did I miss a plugin or a configuration somewhere? 





More information about the Pulp-list mailing list