Project

Profile

Help

Issue #4369

closed

Lazy sync doesn't save artifact to filesystem

Added by daviddavis about 5 years ago. Updated almost 5 years ago.

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

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

Also available in: Atom PDF