Project

General

Profile

action #12964

Updated by SLindoMansilla over 3 years ago

## Observation 

 We have #9580 for SLE, now enable for openSUSE 

 Annoyingly, the test module `boot_into_snapshot` doesn't boot into a snapshot. It is only scheduled in test suite `boot_to_snapshot` and directly after `grub_test`, which boots into a RO snapshot if setting `BOOT_TO_SNAPSHOT` is present (See https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tests/installation/grub_test.pm#L80) 
 Then, `boot_into_snapshot` expects the SUT to be already booted into a RO snapshot and performs checks and the rollback (in my opinion, the test module `boot_into_snapshot` should be renamed to `rollback_from_ro_snapshot` to properly describe what it does). 

 Because `boot_into_snapshot` expects the system booted into a RO snapshot, the check `assert_script_run('touch /etc/NOWRITE;test ! -f /etc/NOWRITE');` is **mandatory**. 
 If the check fails, it means that the SUT is on a writable snapshot, and that could mean that there is a product bug or a test bug. 

 **IMPORTANT** 
 If the test module **boot_into_snapshot** is scheduled after **grub_test** and the job doesn't have the setting `BOOT_TO_SNAPSHOT=1`, **grub_test** will boot into the default writable snapshot and `touch...NOWRITE` will of course fail, _the failure is a test bug_, as can be seen in the verification run http://10.162.23.47/tests/8183 
 - `grub_test` (which is booting into default writable snapshot) 
 - `first_boot` 
 - `opensuse_welcome` 


 ## Acceptance criteria 

 - **AC1:** **boot_into_snapshot** is scheduled at the end of `upgrade_Leap_15.1_gnome` scenario (Leap->Tumbleweed) for the last Leap version. 
 - **AC2:** **boot_into_snapshot** is able to rollback from an upgraded tumbleweed to Leap. 


 ## Tasks Suggestions 

 1. Rename `boot_into_snapshot` Verify that the boot to `rollback_from_ro_snapshot`. 
 2. Schedule `rollback_from_ro_snapshot` as the **last** module from snapshot test suite `upgrade_Leap_15.1_gnome`. 
 3. Create a test module called `boot_into_snapshot` which should be executed (**instead** of `grub_test`) just before `rollback_from_ro_snapshot`, which should take care of waiting also works for grub leap and booting into the RO snapshot. 
 4. Test module schedule for test suite `boot_to_snapshot` should be 
    - `boot_into_snapshot` (the new created one) 
    - `rollback_from_ro_snapshot` (the previously wrongly called `boot_into_snapshot`) 
 5. Test module schedule for `upgrade_Leap_15.1_gnome` should be 
    - isosize 
    - bootloader 
    - welcome 
    - upgrade_select 
    - online_repos 
    - resolve_dependency_issues 
    - installation_overview 
    - disable_grub_timeout 
    - start_install 
    - await_install 
    - logs_from_installation_system 
    - reboot_after_installation 
    - grub_test 
    - first_boot 
    - opensuse_welcome 
    - system_prepare 
    - zypper_clear_repos 
    - zypper_ar 
    - zypper_ref 
    - check_network 
    - system_state 
    - prepare_test_data 
    - consoletest_setup 
    - keymap_or_locale 
    - force_scheduled_tasks 
    - textinfo 
    - hostname 
    - x_vt 
    - zypper_lr 
    - ncurses 
    - yast2_lan 
    - curl_https 
    - salt 
    - glibc_sanity 
    - zypper_in 
    - zypper_log 
    - yast2_i 
    - yast2_bootloader 
    - vim 
    - firewall_enabled 
    - sshd 
    - ssh_cleanup 
    - sshfs 
    - mtab 
    - orphaned_packages_check 
    - consoletest_finish 
    - user_gui_login 
    - desktop_runner 
    - xterm 
    - keymap_or_locale_x11 
    - sshxterm 
    - gnome_control_center 
    - gnome_tweak_tool 
    - gnome_terminal 
    - gedit 
    - firefox 
    - firefox_audio 
    - chromium 
    - graphicsMagick 
    - ooffice 
    - oomath 
    - oocalc 
    - glxgears 
    - nautilus 
    - gnome_music 
    - evolution 
    - desktop_mainmenu 
    - inkscape 
    - gimp 
    - hexchat 
    - vlc 
    - reboot_gnome 
    - `boot_into_snapshot` (the new created one) 
    - `rollback_from_ro_snapshot` (the previously wrongly called `boot_into_snapshot`) 
    - shutdown 
 6. Verify changes on following scenarios 
    - https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=opensuse&flavor=DVD&machine=64bit&test=boot_to_snapshot&version=Tumbleweed 
    - https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=opensuse&flavor=DVD&machine=64bit&test=upgrade_Leap_15.1_gnome&version=Tumbleweed# tumbleweed. 


 ## Further information 

 Verify that changes do not break: 
 - [latest opensuse-Tumbleweed-DVD-x86_64-boot_to_snapshot@64bit](https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=opensuse&flavor=DVD&machine=64bit&test=boot_to_snapshot&version=Tumbleweed) 
 - [latest sle-15-SP3-Online-x86_64-boot_to_snapshot@64bit](https://openqa.suse.de/tests/latest?arch=x86_64&distri=sle&flavor=Online&machine=64bit&test=boot_to_snapshot&version=15-SP3) 

 Scenario to add `boot_into_snapshot` at the end: 
 - [latest opensuse-Tumbleweed-DVD-x86_64-upgrade_Leap_15.1_gnome@64bit](https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=opensuse&flavor=DVD&machine=64bit&test=upgrade_Leap_15.1_gnome&version=Tumbleweed#live)

Back