Project

Profile

Help

Issue #4369

Lazy sync doesn't save artifact to filesystem

Added by daviddavis 9 months ago. Updated 6 months ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

I'm probably doing some wrong but it doesn't look like syncing on demand is saving the file to the filesystem.

Reproducer

Setup:

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')
http POST http://localhost:8000/pulp/api/v3/remotes/file/ name='bar' url='https://repos.fedorapeople.org/pulp/pulp/demo_repos/test_file_repo/PULP_MANIFEST' policy=on_demand
export REMOTE_HREF=$(http :8000/pulp/api/v3/remotes/file/ | jq -r '.results[] | select(.name == "bar") | ._href')
http POST ':8000'$REMOTE_HREF'sync/' repository=$REPO_HREF mirror=True
sleep 5
http POST http://localhost:8000/pulp/api/v3/publishers/file/ name=bar
export PUBLISHER_HREF=$(http :8000/pulp/api/v3/publishers/file/ | jq -r '.results[] | select(.name == "bar") | ._href')
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')
http POST http://localhost:8000/pulp/api/v3/distributions/ name='baz' base_path='foo' publication=$PUBLICATION_HREF

Then:

$ http GET http://localhost:8080/pulp/content/foo/test.iso
HTTP/1.1 200 OK
Accept-Ranges: bytes
AppServer: people02.fedoraproject.org
AppTime: D=389
Cache-Control: max-age=1800
Content-Length: 3145728
Content-Type: application/octet-stream
Date: Thu, 31 Jan 2019 20:38:57 GMT
Etag: "300000-4d605cef22980" 
Expires: Thu, 31 Jan 2019 21:08:57 GMT
Last-Modified: Mon, 18 Feb 2013 20:45:42 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-GitProject: (null)

+-----------------------------------------+
| NOTE: binary data not shown in terminal |
+-----------------------------------------+

$ ls /var/lib/pulp/artifact/
$

If I switch back to immediate the files show up:

$ http PATCH :8000$REMOTE_HREF policy=immediate
$ http POST ':8000'$REMOTE_HREF'sync/' repository=$REPO_HREF mirror=True
$ ls /var/lib/pulp/artifact/
04  58  f5

History

#1 Updated by daviddavis 9 months ago

  • Status changed from NEW to CLOSED - WORKSFORME

@gmbnomis figured this out: httpie aborts the request once it sees binary data and therefore it never reaches the code that saves the artifact to the filesystem.

#2 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#3 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3, Pulp 3 RC Blocker)

Please register to edit this issue

Also available in: Atom PDF