Project

Profile

Help

Story #8919

closed

Story #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

Added by dkliban@redhat.com over 3 years ago. Updated over 3 years ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Target Release - OSTree:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 104
Quarter:

Description

  1. 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.

  2. Download the new image from Image Builder

  3. Upload the new image into the existing repository in Pulp, optionally specify a new ref

  4. 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

Related to OSTree Support - Story #8918: As a user, I can create a new repository by uploading an archive with OSTree commitsMODIFIEDlmjachky

Actions
Actions #1

Updated by dkliban@redhat.com over 3 years ago

  • Description updated (diff)
Actions #2

Updated by dkliban@redhat.com over 3 years ago

  • Sprint/Milestone set to 2.0.0a1
Actions #3

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?

Actions #4

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.

Actions #5

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.

Actions #6

Updated by dkliban@redhat.com over 3 years ago

  • Description updated (diff)
Actions #7

Updated by dkliban@redhat.com over 3 years ago

  • Parent issue set to #8924
Actions #8

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
Actions #9

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).

Actions #10

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?

Actions #11

Updated by lmjachky over 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to lmjachky
  • Sprint set to Sprint 104
Actions #12

Updated by lmjachky over 3 years ago

  • Status changed from ASSIGNED to POST

Added by Lubos Mjachky over 3 years ago

Revision 3f35db9c | View on GitHub

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

Actions #13

Updated by Anonymous over 3 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

Also available in: Atom PDF