-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ostree pull cannot pull child commit content from pulp #288
Comments
Can you ensure that the commit was not uploaded to Pulp and is not accessible at |
I don't understand 'the commit was not uploaded to Pulp and is not accessible', but I tried in my env and I found the parent commit in local repo: And I tried to find child commit, but didn't find it.
This is the first time we use pulp to serve the commit content. We usually use http server or container to serve parent commit, and then pull it to local repo, then we serve child commit again and pull it to local repo.
|
By "the commit was not uploaded to Pulp and is not accessible" I meant to verify whether the commit was uploaded to Pulp or not.
Furthermore, if it was uploaded, can we verify whether it is accessible from the distribution?
Now, I am in doubt. 😆 Are you saying that the commit does not even exist locally? |
Hi, following are my steps: (to make sure we are on the same page) Reproduce steps:
Actual result:
Expected result: |
Following is my pulp repository info: [root@yih-rr93 ~]# pulp ostree repository list Can you please let me know what value should be used for {REPO_VERSION_HREF_AFTER_UPLOAD}? |
I could reproduce the issue. The problem could lie in using the
|
The problem is that the summary file is not correctly updated. Commits and other objects are uploaded to Pulp with no issues.
|
Can you verify if the attached patch resolved the issue, please: #291? |
Sure, working on it now. |
Version
docker.io/pulp/pulp:latest
Describe the bug
Upload parent commit into pulp and ostree pull can pull the commit content from pulp, then upload child commit into pulp, but ostree pull cannot find the new commit content.
To Reproduce
Build a parent commit and upload to pulp.
[root@yih-rr93 ~]# pulp ostree repository list
{
"pulp_href": "/pulp/api/v3/repositories/ostree/ostree/018a8d71-03ab-7e7c-b0f4-f81804d0915c/",
"pulp_created": "2023-09-13T07:28:28.587741Z",
"versions_href": "/pulp/api/v3/repositories/ostree/ostree/018a8d71-03ab-7e7c-b0f4-f81804d0915c/versions/",
"pulp_labels": {},
"latest_version_href": "/pulp/api/v3/repositories/ostree/ostree/018a8d71-03ab-7e7c-b0f4-f81804d0915c/versions/1/",
"name": "test",
"description": null,
"retain_repo_versions": null,
"remote": null,
"compute_delta": true
}
Pull commit content from pulp to local repo.
[root@yih-rr93 ~]# mkdir -p /var/www/html/repo
[root@yih-rr93 ~]# ostree --repo=/var/www/html/repo init --mode=archive
[root@yih-rr93 ~]# ostree --repo=/var/www/html/repo remote add --no-gpg-verify edge-pulp http://localhost:9090/pulp/content/test/
[root@yih-rr93 ~]# ostree --repo=/var/www/html/repo pull --mirror edge-pulp rhel/9/x86_64/edge
3344 metadata, 25967 content objects fetched; 839709 KiB transferred in 484 seconds; 1.4 GB content written
Check hash of commit in pulp and local repo, they are same.
[root@yih-rr93 ~]# curl http://localhost/repo/refs/heads/rhel/9/x86_64/edge
37b860943b1b39f1cbade7e0f71016c8e64b34c96510d0b73981a567ac4514d2
[root@yih-rr93 ~]# curl -sf http://192.168.100.1:9090/pulp/content/test/refs/heads/rhel/9/x86_64/edge
37b860943b1b39f1cbade7e0f71016c8e64b34c96510d0b73981a567ac4514d2
Build a child commit and upload to pulp.
[root@yih-rr93 ~]# pulp ostree repository list
{
"pulp_href": "/pulp/api/v3/repositories/ostree/ostree/018a8d71-03ab-7e7c-b0f4-f81804d0915c/",
"pulp_created": "2023-09-13T07:28:28.587741Z",
"versions_href": "/pulp/api/v3/repositories/ostree/ostree/018a8d71-03ab-7e7c-b0f4-f81804d0915c/versions/",
"pulp_labels": {},
"latest_version_href": "/pulp/api/v3/repositories/ostree/ostree/018a8d71-03ab-7e7c-b0f4-f81804d0915c/versions/2/",
"name": "test",
"description": null,
"retain_repo_versions": null,
"remote": null,
"compute_delta": true
}
Check hash of commit in pulp, the hash of commit in pulp has changed to child commit hash.
[root@yih-rr93 ~]# curl -sf http://192.168.100.1:9090/pulp/content/test/refs/heads/rhel/9/x86_64/edge
d8f34de49f162c956c9261f69dadfba036d1490928b5719b0b539f34d05d07cf
Pull child commit content from pulp to local production repo, but failed. The command seems cannot found the child commit, nothing new was pulled from pulp.
[root@yih-rr93 ~]# ostree --repo=/var/www/html/repo pull --mirror edge-pulp rhel/9/x86_64/edge
1 metadata, 0 content objects fetched; 14 B transferred in 0 seconds; 0 bytes content written
Check hash of commit in pulp and local repo, it is still the parent commit hash.
[root@yih-rr93 ~]# curl http://localhost/repo/refs/heads/rhel/9/x86_64/edge
37b860943b1b39f1cbade7e0f71016c8e64b34c96510d0b73981a567ac4514d2
Expected behavior
Should be able to pull the latest commit content (which is child commit) from pulp
Additional context
Add any other context about the problem here. Please provide links to any previous discussions via Discourse or Bugzilla.
The text was updated successfully, but these errors were encountered: