Skip to content

Commit

Permalink
Add container upgrade --check function
Browse files Browse the repository at this point in the history
Previously, OS based on native containers could not retrieve the
manifest difference between the current system container image and its
corresponding remote container image without performing an actual
upgrade. This PR solves this issue by allowing the manifest difference
to be outputted when using the `rpm-ostree upgrade --check` command.

A `ManifestDiff` struct needed to be retrieved using `ostree-rs-ext`,
requring several new functions in both Rust and C that were bridged
through CXX Bridge.

The `cached_update` object also needed to be modifed and updated with
the `ManifestDiff` in order to extend compatibility with other products
using rpm-ostree. However, a notable difference between how the
`--upgrade --check` function works for ostree based system and a native
container based system is that native containers skip over the use of
`checksums`. This is because rebasing to locally stored container images
(as opposed to a remote repository) does not create a valid ostree
refspec.

A Rust unit test was implemented to confirm that a difference between
two manifests (stored locally in the rust/test folder) can be
successfully retrieved. A `kola` test was also implemented to confirm
that running `rpm-ostree upgrade --check` returns the correct manifest
difference for a potential upgrade.
  • Loading branch information
lukewarmtemp committed Aug 9, 2023
1 parent 45060ec commit 3c734f3
Show file tree
Hide file tree
Showing 65 changed files with 2,077 additions and 395 deletions.
2 changes: 1 addition & 1 deletion .cci.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
stage("Build") {
parallel rpms: {
def n = 4
buildPod(memory: "4Gi", cpu: "${n}") {
buildPod(memory: "6Gi", cpu: "${n}") {
checkout scm
// 2:1 job to CPU at most should keep us from getting kicked out
shwrap("""RPM_BUILD_NCPUS=${n} CARGO_BUILD_JOBS=${n} ./ci/coreosci-rpmbuild.sh""")
Expand Down
Loading

0 comments on commit 3c734f3

Please sign in to comment.