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

Add support to bare metal for direct image installation of SL Micro #20253

Merged
merged 4 commits into from
Sep 30, 2024

Conversation

czerw
Copy link
Contributor

@czerw czerw commented Sep 24, 2024

Enhancement poo#167021: SL Micro doesn't have installer like openSUSE
or SLE. Only raw images are supported. If we want to install SL Micro
to bare metal, we need to directly copy image to destination, this is
documented and supported way. The idea behind this extension, is to
use existing openQA boot modules for particular backends and boot SLE
installer, use installation console to mount nfs share from openQA and
deploy image to target disk. We need to modify grub configuration
before first boot, to be able to see menu in hardware consoles. root
password is configured by ignition, which has own separate parition on
the same disk. There are supported following backends and
architectures hmc/ppc64le, ipmi/x86_64/aarch64. Variables MIRROR_HTTP
and REPO_0 are needed to properly boot installer on hmc
backend. Variable IPXE_BOOT_FIXED must be defined for ipmi. There can
be used optional variables IPXE_BOOT_FIXED_DISTRI and
IPXE_BOOT_FIXED_VERSION to boot specific installer version. It is
possible to specify target disk on all backends by variable
MICRO_INSTALL_IMAGE_TARGET_DEVICE, the default is /dev/sda.

Copy link

Great PR! Please pay attention to the following items before merging:

Files matching lib/**.pm:

  • Consider adding or extending unit tests in t/

This is an automatically generated QA checklist based on modified files.

@czerw czerw changed the title Add support to bar emetal for direct image installation for SL Micro Add support to bare metal for direct image installation for SL Micro Sep 24, 2024
@czerw czerw force-pushed the poo#167021 branch 2 times, most recently from 42d8faa to 7284901 Compare September 24, 2024 13:00
variables.md Outdated Show resolved Hide resolved
variables.md Outdated Show resolved Hide resolved
@czerw czerw force-pushed the poo#167021 branch 2 times, most recently from 7c842e8 to a63c4f8 Compare September 24, 2024 13:40
We need to boot any installer of distribution independent on DISTRI
and VERSION variables. New variable IPXE_BOOT_FIXED indicates that we
want to boot fixed version. It will boot by default SLE 15-SP6, but it
is possible to override it by IPXE_BOOT_FIXED_DISTRI and
IPXE_BOOT_FIXED_VERSION variables.
@czerw czerw changed the title Add support to bare metal for direct image installation for SL Micro Add support to bare metal for direct image installation of SL Micro Sep 25, 2024
@czerw czerw force-pushed the poo#167021 branch 7 times, most recently from 2d280d5 to ffbc928 Compare September 25, 2024 10:35
@czerw czerw marked this pull request as ready for review September 25, 2024 10:38
tests/microos/install_image.pm Outdated Show resolved Hide resolved
tests/microos/install_image.pm Outdated Show resolved Hide resolved
tests/microos/install_image.pm Outdated Show resolved Hide resolved
tests/microos/install_image.pm Outdated Show resolved Hide resolved
Copy link
Contributor

@schlad schlad left a comment

Choose a reason for hiding this comment

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

+1
surely the point from Jozef seems like should be solved but otherwise I really like this PR.

tests/microos/install_image.pm Outdated Show resolved Hide resolved
tests/microos/install_image.pm Outdated Show resolved Hide resolved
@czerw czerw marked this pull request as draft September 26, 2024 12:58
@czerw czerw force-pushed the poo#167021 branch 8 times, most recently from b0de9c4 to 68ec3d5 Compare September 26, 2024 14:47
@czerw czerw marked this pull request as ready for review September 26, 2024 17:26
Enhancement poo#167021: SL Micro doesn't have installer like openSUSE
or SLE. Only raw images are supported. If we want to install SL Micro
to bare metal, we need to directly copy image to destination, this is
documented and supported way. The idea behind this extension, is to
use existing openQA boot modules for particular backends and boot SLE
installer, use installation console to mount nfs share from openQA and
deploy image to target disk. We need to modify grub configuration
before first boot, to be able to see menu in hardware consoles. root
password is configured by ignition, which has own separate parition on
the same disk. There are supported following backends and
architectures hmc/ppc64le, ipmi/x86_64/aarch64. Variables MIRROR_HTTP
and REPO_0 are needed to properly boot installer on hmc
backend. Variable IPXE_BOOT_FIXED must be defined for ipmi. There can
be used optional variables IPXE_BOOT_FIXED_DISTRI and
IPXE_BOOT_FIXED_VERSION to boot specific installer version. It is
possible to specify target disk on all backends  by variable
MICRO_INSTALL_IMAGE_TARGET_DEVICE, the default is /dev/sda.
Copy link
Contributor

@rfan1 rfan1 left a comment

Choose a reason for hiding this comment

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

LGTM

upload_logs("/mnt/etc/default/grub", failok => 1);
# Set permanent grub configuration
assert_script_run("sed -i 's/console=ttyS0,115200/console=ttyS1,115200/g' /mnt/etc/default/grub") if is_x86_64;
# Fully disable graphical terminal on legacy systems without UEFI
Copy link
Contributor

Choose a reason for hiding this comment

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

We ever confirmed with SLM project managers that SLE Micro only supports uefi.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't matter at all, especially for kernel testing where we have more legacy machines than in uefi mode.

Choose a reason for hiding this comment

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

Really?
How many machines relevant today cannot do EFI?

Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't matter at all, especially for kernel testing where we have more legacy machines than in uefi mode.

I do not quite agree . It will brings invalid test results, I think. @jlausuch HDYT?

Choose a reason for hiding this comment

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

Also shouldn't EFI provide a mechanism for thekernel to get the actual console set up in the BIOS?

Even if it's not the case it would be much more reasonable get the console settings from the commandline of the runnig kernel rather than hardcoding it.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah this is specific part is in the newly introduced .pm module, so personally I see no reason to block the merge.
We could improve handling of this parameter and we could make it in a way that the test run could change the behavior, but this could be done later when it is needed and by folks who needed it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Even if it's not the case it would be much more reasonable get the console settings from the commandline of the runnig kernel rather than hardcoding it.

Hardcoded console settings are directly in image produced by ibs. If you think it is not right, feel free to file a bug or create jira for it.

Copy link

Choose a reason for hiding this comment

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

These are, however, additional hardcoded setting in this test, separate from settings hardcoded in the image.

The value with which the settings are replaced could be taken from the commandline of the running kernel which can in turn be adjusted in the test setup making it easier to adjust console settings for the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could be, but console of running kernel is already configured by the test in ipxe boot script from variable IPXE_CONSOLE. Follow up ticket for this change was already created and is mentioned on other comments in this PR.

Copy link

Choose a reason for hiding this comment

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

@schlad schlad merged commit 1873d9d into os-autoinst:master Sep 30, 2024
10 checks passed
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.

8 participants