Skip to content

Automate scenario to allow to use some RAIDs as if they were disks #22735

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

okynos
Copy link
Contributor

@okynos okynos commented Jul 22, 2025

After a long journey we completed the required restrictions to make RAID0, software RAID to work.
We have added a job to produce and publish RAID0 images configured with Agama, after that another job grab such images and install SLES16 over the RAID without creating a new one.
In addition, we could see that the swap partition changed in Agama installation (The RAID is modified but not recreated).

@okynos okynos added the qe-yam label Jul 22, 2025
@okynos okynos requested review from chcao and rakoenig July 22, 2025 09:05
@okynos okynos force-pushed the 184273-automate-raid-scenario-v2 branch from 1aac792 to 9969f47 Compare July 22, 2025 09:06
@okynos okynos added WIP Work in progress and removed WIP Work in progress labels Jul 22, 2025
@@ -29,6 +29,10 @@ sub boot_from_hd {
send_key 'ret';
}

sub boot_first_entry {
Copy link
Contributor

Choose a reason for hiding this comment

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

If I would be picky then I would name it "boot_current_selection". Its just the context of first calling "boot_from_hd" and then entering the grub that comes from the hard disk that this "send_key ret" boots the first entry.


sub run {
my $grub_menu = $testapi::distri->get_grub_menu_agama();

$grub_menu->expect_is_shown();
$grub_menu->boot_from_hd();
$grub_menu->boot_first_entry() if (check_var('BOOTFROM', 'd'));
Copy link
Contributor

Choose a reason for hiding this comment

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

What makes me wonder: The only other test scenario in the production group that calls agama_boot_from_hdd is seles_default. And here the bootloader that is on the hard disk has a timeout and then automatically boots the default selection, but in our unattended scenario using profiles it seems that we have a grub configruation that has no such default setting. Why? Is this a bug or a feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is a feature in a specific case.
The case:
In this scenario we have different hard disks [HDD_1, HDD_2, ...] attached to the use_md... job. OpenQA will define the boot from hard disk as a default desired behavior but, in this case we need to boot Agama to modify the RAID and install SLES over disks, for this reason, we force boot with BOOTFROM parameter. This parameter will set cd-rom as a default media to boot.
No problem until this point.
After the installation, The system is rebooted and the default boot media is again the cd-rom for that reason we need a way to force the boot from hard disk with the step agama_boot_from_hdd then, it will jump to boot from hard disk option.
The only thing that I'm in doubt is if boot_first_entry is still required, I will check if the way to boot changed in some of my numerous changes and let you know 😁

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 is required, example of the error: https://openqa.suse.de/tests/18526060#step/first_boot/2

Copy link
Contributor

@lemon-suse lemon-suse Jul 23, 2025

Choose a reason for hiding this comment

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

If boot from cd-rom is required for this test scenario, then it means different boot path for installation and post-installation.
I think we can set BOOTFROM=c (hard disk) in agama_auto before reboot to make it boot from hard disk after installation as normal case.

Copy link
Contributor Author

@okynos okynos Jul 23, 2025

Choose a reason for hiding this comment

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

Usually, I favor this kind of changes but I had bad experiences modifying agama_auto that is used by others teams and it could cause errors in external jobs.
In addition, I'm unsure about if changing to BOOTFROM=c in the middle of the execution will take effect because it is a Guest reboot not Qemu reboot. In any case, I can try if it works.

@okynos okynos added the WIP Work in progress label Jul 22, 2025
@okynos okynos force-pushed the 184273-automate-raid-scenario-v2 branch from b2e0646 to 21f5a50 Compare July 22, 2025 14:34
@okynos okynos removed the WIP Work in progress label Jul 22, 2025
@@ -0,0 +1,12 @@
---
name: agama_raid_unattended_change_disk
Copy link
Contributor

Choose a reason for hiding this comment

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

Normally here will set the same name as the file:
agama_raid_unattended_use_existing_md_raid

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I forgot to update thanks

Copy link
Contributor

@chcao chcao left a comment

Choose a reason for hiding this comment

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

LGTM

@okynos okynos force-pushed the 184273-automate-raid-scenario-v2 branch from 9f9e174 to 215215b Compare July 23, 2025 10:44
https://progress.opensuse.org/issues/184273

Automate scenario to allow to use some RAIDs as if they were disks

https://progress.opensuse.org/issues/184273

Automate scenario to allow to use some RAIDs as if they were disks

https://progress.opensuse.org/issues/184273

Automate scenario to allow to use some RAIDs as if they were disks

https://progress.opensuse.org/issues/184273

Traslate current development from Chenzi

Clean files and names

Changed way to boot agama on child job

Added grub test

Added select of first entry to boot

Added testapi import

Removed unused step

Added usage of RAID0 device on installation

Remove delete tag in storage

Added search of drives in libssonnet

Changed device dfinition

Fixed drive definition

Added delete of root partition

Changed delete

Changed storage template

Changed storage

Refactor of RAID storage

Added EFI partition

Changed remove of boot partition

Added boot in RAID

Use isolated EFI partition

Fix boot search

Fix boot problem

Changed RAID partitions

Added size to partitions

Adjust home size

Changed swap size

Remove validation

Changed validate swap test

Removed second hdd boot select

Removed commented line

Test to remove the boot selector

Removed unrequired code

Minor fix
@okynos okynos force-pushed the 184273-automate-raid-scenario-v2 branch from 215215b to e636292 Compare July 23, 2025 10:45
@okynos
Copy link
Contributor Author

okynos commented Jul 23, 2025

Changes applied, thanks for the bootloader suggestion @rakoenig

Copy link
Contributor

@rakoenig rakoenig left a comment

Choose a reason for hiding this comment

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

This looks pretty good now.

@@ -8,6 +8,7 @@
use base "installbasetest";
use strict;
use warnings;
use testapi;
Copy link
Contributor

Choose a reason for hiding this comment

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

Then don't need include testapi.

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

Successfully merging this pull request may close these issues.

4 participants