[Pulp-list] Create distribution issues

Heide, Todd Todd.Heide at sccompanies.com
Wed May 6 19:58:15 UTC 2020


Reading backwards in the link that was posted in the reply, Under User setup, does Pulpcore and pulp-file need to be installed on the same box that pulp installer was run on? Maybe that is what I am missing. 

From: Dennis Kliban <dkliban at redhat.com> 
Sent: Wednesday, May 6, 2020 12:00 PM
To: Heide, Todd <Todd.Heide at sccompanies.com>
Cc: Pulp-list at redhat.com
Subject: Re: [Pulp-list] Create distribution issues

[EXTERNAL] This message originated outside of the organization. Use caution when opening files or following links in this email!
On Tue, May 5, 2020 at 10:40 AM Heide, Todd <mailto:Todd.Heide at sccompanies.com> wrote:
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"
    ]
}

FileDsitribution requires a publication not a repository. Instructions for that are here: https://pulp-file.readthedocs.io/en/latest/workflows/publish-host.html#publish-and-host
 
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? 

A File repository version contains all the files. However, File publications always include a manifest file that lists all the files and checksums for those files. The manifest is generated only when a publication is created from a repository version. 

RPM repositories work the same way and always require generating a publication first also. 

 

_______________________________________________
Pulp-list mailing list
mailto:Pulp-list at redhat.com
https://www.redhat.com/mailman/listinfo/pulp-list




More information about the Pulp-list mailing list