Story #8919
closedStory #8924: As a user, I can manage OSTree repositories
As a user, I can upload a Fedora IoT update image with OSTree commits to an existing repository
100%
Description
-
Use the URL of an OSTree repository in Pulp and a ref in that repository to build a new Fedora IoT image in Image Builder.
-
Download the new image from Image Builder
-
Upload the new image into the existing repository in Pulp, optionally specify a new ref
-
Reboot a host that is using the Pulp repository for updates and confirm that it is able to retrieve the new updates.
In cases where the uploaded archive contains commits that are not children of any of the commits already in the repository, the upload still succeeds and clients are able to use them. The history from client's perspective will be limited to what was last uploaded. Pulp users will be able to roll back repository versions to expose more history if that is needed.
Related issues
Updated by ttereshc over 3 years ago
The new image, does it have some kind of diff or will it replace what is in repo? How well will that work when original commits are reordered or the history is not linear in some way. Basically when it's not easy to do an incremental change?
Updated by dkliban@redhat.com over 3 years ago
The use case described implies that the new commits being uploaded have a parent commit that already exists in this repository. I'll ask OSTree devs what should happen if the parent commits are missing.
Updated by dkliban@redhat.com over 3 years ago
The parent commit does not have to be in the repository for the upload to succeed.
Updated by lmjachky over 3 years ago
- Related to Story #8918: As a user, I can create a new repository by uploading an archive with OSTree commits added
Updated by lmjachky over 3 years ago
This is almost implemented in the PR referenced in the issue https://pulp.plan.io/issues/8918.
In addition to that PR, we will need to associate a parent commit with its child when passed via the API. If there does not exist a relation between a commit and its parent (i.e., a user passed invalid data), an error should be raised. But, if no parent commit is specified, Pulp will simply add a new commit and will update the ref in a new repository version (this part already works in https://pulp.plan.io/issues/8918).
Updated by dkliban@redhat.com over 3 years ago
lmjachky wrote:
This is almost implemented in the PR referenced in the issue https://pulp.plan.io/issues/8918.
In addition to that PR, we will need to associate a parent commit with its child when passed via the API. If there does not exist a relation between a commit and its parent (i.e., a user passed invalid data), an error should be raised. But, if no parent commit is specified, Pulp will simply add a new commit and will update the ref in a new repository version (this part already works in https://pulp.plan.io/issues/8918).
This behavior sounds right to me.
How is the user specifying a parent commit? Is it part of the archive or is it a parameter that is provided in addition to the tarball?
Updated by lmjachky over 3 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to lmjachky
- Sprint set to Sprint 104
Updated by lmjachky over 3 years ago
- Status changed from ASSIGNED to POST
Added by Lubos Mjachky about 3 years ago
Updated by Anonymous about 3 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 3f35db9cc04caa42707f38c081cca14f2125190b.
Add support for adding commits to a repository
In this commit, refshead was renamed to ref. Also, before this commit, we referred to adding commits as uploading. This was conceptually wrong since we were not uploading commits, but rather importing them from artifacts already uploaded to Pulp.
closes #8919