From 539069c871db2faf9cad06ae6c14a54d14e9dce8 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 12 Sep 2022 07:19:57 -0400 Subject: [PATCH] Stabilize container functionality I think we have sufficient experience with this to call this functionality officially stable. --- docs/container.md | 7 ++----- docs/layering.md | 2 +- rust/src/cliwrap/yumdnf.rs | 3 +-- tests/kolainst/destructive/container-image | 9 +++++---- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/docs/container.md b/docs/container.md index a41150a69a..88201a20ed 100644 --- a/docs/container.md +++ b/docs/container.md @@ -1,12 +1,9 @@ --- -parent: Experimental features -nav_order: 1 +nav_order: 5 --- # ostree native containers -For more information on this, see [CoreOS layering](https://github.com/coreos/enhancements/pull/7). - rpm-ostree inherits work in [ostree-rs-ext](https://github.com/ostreedev/ostree-rs-ext/) to create "container native ostree" functionality. This elevates OCI/docker containers to be natively supported as a transport mechanism for bootable operating systems. @@ -16,7 +13,7 @@ be natively supported as a transport mechanism for bootable operating systems. Use this to switch to booting from a container image: ``` -$ rpm-ostree rebase --experimental ostree-unverified-registry:quay.io/coreos-assembler/fcos:testing-devel +$ rpm-ostree rebase ostree-unverified-registry:quay.io/coreos-assembler/fcos:testing-devel ``` In the near future, we hope to push this more officially to `quay.io/fedora/coreos:stable`. diff --git a/docs/layering.md b/docs/layering.md index d2eb77568c..421d5a85c9 100644 --- a/docs/layering.md +++ b/docs/layering.md @@ -256,7 +256,7 @@ We need to stop the Zincati service so that auto-updates won't interfere with ou Next, we call `rpm-ostree` to rebase our system using the image we just pushed to quay. ```bash -[core@tutorial ~]$ sudo rpm-ostree rebase --experimental \ +[core@tutorial ~]$ sudo rpm-ostree rebase \ ostree-unverified-registry:quay.io//my-custom-fcos ``` diff --git a/rust/src/cliwrap/yumdnf.rs b/rust/src/cliwrap/yumdnf.rs index 3248420cdc..5d9aa5deec 100644 --- a/rust/src/cliwrap/yumdnf.rs +++ b/rust/src/cliwrap/yumdnf.rs @@ -198,8 +198,7 @@ fn disposition(opt: Opt, hosttype: SystemHostType) -> Result { ImageCmd::Rebase(rebase) => { let container_ref = rebase.to_ostree_container_ref()?; let container_ref = container_ref.to_string(); - let experimental = rebase.experimental.then(|| "--experimental"); - let cmd = ["rebase"].into_iter().chain(experimental).chain([container_ref.as_str()]) + let cmd = ["rebase"].into_iter().chain([container_ref.as_str()]) .map(|s| s.to_string()).collect::>(); RunDisposition::ExecRpmOstree(cmd) }, diff --git a/tests/kolainst/destructive/container-image b/tests/kolainst/destructive/container-image index 56491475b0..2d97877755 100755 --- a/tests/kolainst/destructive/container-image +++ b/tests/kolainst/destructive/container-image @@ -45,8 +45,9 @@ case "${AUTOPKGTEST_REBOOT_MARK:-}" in # Since we're switching OS update stream, turn off zincati systemctl mask --now zincati - ostree container encapsulate --compression-fast --repo=/ostree/repo ${checksum} "${image}" - rpm-ostree rebase "$image_pull" --experimental | tee out.txt + ostree container encapsulate --repo=/ostree/repo ${checksum} "${image}" + # This one keeps --experimental, but we also test without it below + rpm-ostree rebase --experimental "$image_pull" | tee out.txt assert_file_has_content out.txt 'Importing.*'"$image_pull" rpmostree_assert_status ".deployments[0][\"container-image-reference\"] == \"ostree-unverified-image:$image\"" rpmostree_assert_status ".deployments[0][\"checksum\"] == \"${checksum}\"" @@ -57,7 +58,7 @@ case "${AUTOPKGTEST_REBOOT_MARK:-}" in # Test rebasing back to ostree https://github.com/coreos/rpm-ostree/issues/3677 rpm-ostree rebase "$checksum" - rpm-ostree rebase "$image_pull" --experimental + rpm-ostree rebase "$image_pull" /tmp/autopkgtest-reboot 1 ;; @@ -179,7 +180,7 @@ EOF fi derived=oci:$image_dir:derived skopeo copy containers-storage:localhost/fcos-derived $derived - rpm-ostree rebase --experimental ostree-unverified-image:$derived + rpm-ostree rebase ostree-unverified-image:$derived rm $image_dir -rf /tmp/autopkgtest-reboot 3 ;;