Skip to content
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

New test - rpm-ostree-container-bootc + related improvements #1096

Closed
wants to merge 4 commits into from

Conversation

jikortus
Copy link
Contributor

The test is based on previous work from Vladimir Slavik.

- pass KSTEST_* variables into the container env
- ensure disk images are kept with $KSTESTS_KEEP == 2
The ostree environments have most of the filesystem read-only
(including /usr), but this can be overcome via an overlay.

In such case the test script intended for run in the system resides
in /var/lib/extensions/kickstart-tests/usr/libexec instead of
the usual location (/usr/libexec).
@jikortus jikortus force-pushed the ostreecontainer-bootc branch from fc5599e to cad936d Compare March 21, 2024 16:34
@rvykydal
Copy link
Contributor

/test-platforms

1 similar comment
@rvykydal
Copy link
Contributor

/test-platforms

It tests installation of a bootable container image
(with bootc/bootupd) and boot of the installed system,
as well as --remote and --stateroot parameters of
ostreecontainer kickstart command.

It's based on previous work from Vladimir Slavik.
@jikortus jikortus force-pushed the ostreecontainer-bootc branch from cad936d to 11bd404 Compare March 25, 2024 14:53
@jikortus
Copy link
Contributor Author

It seems that the test was failing with RHEL-9 due to KSTEST_OS_NAME and KSTEST_OS_VERSION environment variables extracted from boot.iso not being passed to the test environment. I added another commit that should hopefully fix it (works OK in my setup).

@rvykydal rvykydal self-assigned this Mar 27, 2024
@rvykydal
Copy link
Contributor

Sorry, I started to look at the patchset, did some wrong review and deleted it.
Thank you for the PR!

@rvykydal
Copy link
Contributor

rvykydal commented Mar 27, 2024

Nice work. I am suggesting updates upon your great work in #1116. Mostly because our common handling of os (rhel / fedora) substitutions at various places is not very clear at first sight:

We do all the per-os substitutions in the .ks.in. I guess you did them also in .sh because you were not aware of the fragments mechanism we use for kickstart commands (%ksappend). For %post scripts we use @KSTESTS_OS_NAME etc.: 41045cf

We should even do it more concisely as in the follow-up commit of the PR: f965f8b

I would also suggest submitting the first commit of this PR as a separate PR as it is not required by the test and reviewing it separately will simplify the process of getting the changes in (I would maybe even split it to 2 PRs).

# Check of the remote URL is appended by the test script

# Checks after boot
cat >> /opt/kickstart-tests/kickstart-test.sh << 'EOF'
Copy link
Contributor

@rvykydal rvykydal Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part was failing for me with file not found, updated here: #1116

@jikortus
Copy link
Contributor Author

@rvykydal, thanks a lot for your feedback and for the improvements you've made in #1116. At this point, I think we could abandon this PR in favour of yours. I'm mostly aware of how the fragments work and I like introducing the new 'variable' for the container image, I didn't really think of approaching it this way :-).

I'll create a new PR for passing the variables (5da51cc) to make it more granular and easier to review. BTW, should I drop 56f198b altogether? It wouldn't likely be needed anymore with the new way to pass the container image URL, OTOH the two variables aren't (IIUIC) passed to the container test environment when executing the tests via run_kickstart_tests.sh - not sure if/how wrong that would be in the end.

@rvykydal
Copy link
Contributor

rvykydal commented Apr 2, 2024

@rvykydal, thanks a lot for your feedback and for the improvements you've made in #1116. At this point, I think we could abandon this PR in favour of yours. I'm mostly aware of how the fragments work and I like introducing the new 'variable' for the container image, I didn't really think of approaching it this way :-).

Okay, let's continue with #1116, feel free to add a review if you want.

I'll create a new PR for passing the variables (5da51cc) to make it more granular and easier to review.

Thank you.

BTW, should I drop 56f198b altogether? It wouldn't likely be needed anymore with the new way to pass the container image URL, OTOH the two variables aren't (IIUIC) passed to the container test environment when executing the tests via run_kickstart_tests.sh - not sure if/how wrong that would be in the end.

Yes, I'd drop it at this point.

Closing as obsoleted by #1116 and #1117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants