-
Notifications
You must be signed in to change notification settings - Fork 295
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
base: master
Are you sure you want to change the base?
Conversation
1aac792
to
9969f47
Compare
@@ -29,6 +29,10 @@ sub boot_from_hd { | |||
send_key 'ret'; | |||
} | |||
|
|||
sub boot_first_entry { |
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.
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')); |
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.
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?
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.
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 😁
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.
It is required, example of the error: https://openqa.suse.de/tests/18526060#step/first_boot/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.
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.
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.
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.
b2e0646
to
21f5a50
Compare
@@ -0,0 +1,12 @@ | |||
--- | |||
name: agama_raid_unattended_change_disk |
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.
Normally here will set the same name as the file:
agama_raid_unattended_use_existing_md_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.
Yeah I forgot to update thanks
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.
LGTM
9f9e174
to
215215b
Compare
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
215215b
to
e636292
Compare
Changes applied, thanks for the bootloader suggestion @rakoenig |
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 looks pretty good now.
@@ -8,6 +8,7 @@ | |||
use base "installbasetest"; | |||
use strict; | |||
use warnings; | |||
use testapi; |
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.
Then don't need include testapi.
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).