Project

Profile

Help

Issue #4452

fetching a published PULP_MANIFEST throws a 404 if file repo version contains no units

Added by jsherril@redhat.com almost 2 years ago. Updated 7 months ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 49
Quarter:

Description

1. Create a repository
2. Create a file publisher
3. Publish the publisher
4. Create a distribution from the publication
5. Fetch PULP_MANIFEST

Receive a 404. According to the docs a PULP_MANIFEST should be created by default for all file publishes (unless the filename has been configured differently in the publisher).


Related issues

Copied to File Support - Test #4538: fetching a published PULP_MANIFEST throws a 404 if file repo version contains no unitsNEW<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by CodeHeeler almost 2 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 49

#2 Updated by amacdona@redhat.com almost 2 years ago

  • Subject changed from fetching PULP_MANIFEST throws a 404 if file repo version contains no units to fetching a published PULP_MANIFEST throws a 404 if file repo version contains no units

#3 Updated by ttereshc almost 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc

#4 Updated by ttereshc almost 2 years ago

@jsherril, I'm not able to reproduce it.

I think you are missing a step of creating a repo version, without it publish fails.
If you create an empty repo version and then publish it, empty PULP_MANIFEST is available.

See my steps below.

# create a repo
http POST http://localhost:8000/pulp/api/v3/repositories/ name=foo
export REPO_HREF=$(http :8000/pulp/api/v3/repositories/ | jq -r '.results[] | select(.name == "foo") | ._href')

# create a publisher
http POST http://localhost:8000/pulp/api/v3/publishers/file/file/ name=bar
export PUBLISHER_HREF=$(http :8000/pulp/api/v3/publishers/file/file/ | jq -r '.results[] | select(.name == "bar") | ._href')

# attempt to publish with no repo version
http POST ':8000'$PUBLISHER_HREF'publish/' repository=$REPO_HREF

HTTP/1.1 400 Bad Request
Allow: POST, OPTIONS
Content-Length: 71
Content-Type: application/json
Date: Wed, 27 Feb 2019 11:59:47 GMT
Server: WSGIServer/0.2 CPython/3.6.8
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "non_field_errors": [
        "Repository has no version available to publish"
    ]
}

# create an empty repo version
http POST ':8000'$REPO_HREF'versions/'

# try to publish again
http POST ':8000'$PUBLISHER_HREF'publish/' repository=$REPO_HREF
export PUBLICATION_HREF=$(http :8000/pulp/api/v3/publications/ | jq -r --arg PUBLISHER_HREF "$PUBLISHER_HREF" '.results[] | select(.publisher==$PUBLISHER_HREF) | ._href')

# create a distribution
http POST http://localhost:8000/pulp/api/v3/distributions/ name='baz' base_path='foo' publication=$PUBLICATION_HREF

# PULP_MANIFEST is available and empty
http GET http://localhost:8080/pulp/content/foo/PULP_MANIFEST

HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 27 Feb 2019 12:01:52 GMT
Last-Modified: Wed, 27 Feb 2019 12:00:45 GMT
Server: Python/3.6 aiohttp/3.5.4

I don't recall any recent changes in that area but, FWIW, I'm at the latest commit of the master branch of pulp, pulpcore-plugin and pulp_file:

  • pulp 45f5ee314a2eb0aea22f9e5f1c2968512ef52dfe
  • pulpcore-plugin ea03cd9b0977fafbe94b370e50e6ea22a8d9e9c0
  • pulp_file b710a18c885f4e209a3a993ba10f168027bd3337

#5 Updated by jsherril@redhat.com almost 2 years ago

  • Status changed from ASSIGNED to CLOSED - WORKSFORME

I cannot reproduce this anymore

#6 Updated by daviddavis over 1 year ago

  • Tags Pulp 3 added

#7 Updated by bherring over 1 year ago

  • Copied to Test #4538: fetching a published PULP_MANIFEST throws a 404 if file repo version contains no units added

#8 Updated by bmbouter over 1 year ago

  • Tags deleted (Pulp 3)

#9 Updated by ggainey 7 months ago

  • Tags Katello added
  • Tags deleted (Katello-P2)

Please register to edit this issue

Also available in: Atom PDF