-
Notifications
You must be signed in to change notification settings - Fork 354
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
Add ostreecontainer support #5277
Conversation
Based on my discussion and recommendation on the bug, the 'registry' transport should be the only one which needs network to work. Other ways of transport should be used for local management. Related: rhbz#2125655
Our intention is to move dependencies specific for Anaconda execution from Lorax into Anaconda. Let's do that for rpm-ostree because we need to also add `skopeo` project to be able to download container images. Require rpm-ostree version which contains: - ostreedev/ostree-rs-ext#464 (simplified syntax) - ostreedev/ostree-rs-ext#462 (stateroot is not mandatory) Related: rhbz#2125655
Hello @kwozyman! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-01-15 11:45:18 UTC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! There's a lot of code, so lots of comments :)
Apart from the points below, there is an empty commit "Add new OSTree container source test (#2125655)" - what's the plan there?
:Type: Kickstart | ||
:Summary: Add support for OSTree native containers (#2125655) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not add this release note file, on RHEL we track release notes in the mandatory bugs/bzs/jira items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed this from the current PR
from pykickstart.commands.ostreecontainer import F38_OSTreeContainer as OSTreeContainer | ||
from pykickstart.commands.ostreesetup import F38_OSTreeSetup as OSTreeSetup | ||
from pykickstart.commands.ostreecontainer import F38_OSTreeContainer as OSTreeContainer | ||
from pykickstart.commands.ostreesetup import F21_OSTreeSetup as OSTreeSetup | ||
from pykickstart.commands.partition import F34_Partition as Partition | ||
from pykickstart.commands.raid import F29_Raid as Raid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep this in sync with the pykickstart PR - I vaguely recall Brian asked for versioning something new as RHEL9_*
, I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, I've updated this area to only reference RHEL9_* to match PyKickstart
pyanaconda/core/constants.py
Outdated
@@ -429,11 +429,15 @@ class DisplayModes(Enum): | |||
# Types of the payload source. | |||
SOURCE_TYPE_LIVE_OS_IMAGE = "LIVE_OS_IMAGE" | |||
SOURCE_TYPE_LIVE_IMAGE = "LIVE_IMAGE" | |||
SOURCE_TYPE_LIVE_TAR = "LIVE_TAR" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, but this does not seem like a related change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right, I've removed all the references to SOURCE_TYPE_LIVE_TAR
@@ -42,6 +42,7 @@ Source0: %{name}-%{version}.tar.bz2 | |||
%define simplelinever 1.8.3-1 | |||
%define subscriptionmanagerver 1.29.31 | |||
%define utillinuxver 2.15.1 | |||
%define rpmostreever 2023.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct for RHEL?
Makefile.am
Outdated
CONTAINER_BUILD_ARGS ?= --no-cache | ||
CONTAINER_BUILD_ARGS ?= --no-cache --network=host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unrelated change, ideally I'd see it as a separate PR from this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed this from the current PR
safe_exec_with_redirect( | ||
"ostree", | ||
["admin", | ||
"--sysroot=" + self._sysroot, | ||
"os-init", | ||
stateroot] | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit says "Remove duplicate call to ostree". But I can't see any other place where os-init would be called?
args = ["admin", "os-init", | ||
"--sysroot=" + self._physroot] | ||
if self._data.stateroot: | ||
args.append(self._data.stateroot) | ||
safe_exec_with_redirect("ostree", args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now here you add os-init again, a few commits later, but it's only for the container code path, so for the regular ostree it is still removed?
We have a new RPMOStreeContainer source now which enables us to use containers as installation source. In this commit we adapt the current rpm_ostree to be able to consume this new container source. Add a lot of rpm ostree tasks tests for the container source. Resolves: rhbz#2125655
RPM OSTree is getting new functionality to use containers as the base image. Thanks to that it's possible to use standard container repositories. This source enables to use these repositories. Related: rhbz#2125655
Use sysroot and physroot in the installation tasks.
PullRemoteAndDeleteTask should not be called for OSTree Container deployment
Syncronize with PyKickstart
I should have mentioned it here explicitly (I noted it only in the RHEL jira issue) I am working on alternative PR #5399. |
Backport of ostreecontainer command
Depends on:
Resolves: https://issues.redhat.com/browse/RHEL-2250