Project

General

Profile

Actions

action #12964

closed

[qe-core][functional][migration] Boot to snapshot after upgrade and then rollback

Added by okurz over 8 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
New test
Target version:
SUSE QA (private) - Milestone 31
Start date:
Due date:
% Done:

100%

Estimated time:
42.00 h
Difficulty:

Description

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

  1. Rename boot_into_snapshot to rollback_from_ro_snapshot.
  2. Schedule rollback_from_ro_snapshot as the last module from 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 for grub 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

Further information

Verify that changes do not break:

Scenario to add boot_into_snapshot at the end:


Checklist

  • TW
  • Leap

Related issues 5 (1 open4 closed)

Related to openQA Tests (public) - action #18014: [migration]test fails in snapper_rollback by select root console failed.Resolvedmitiao2017-03-27

Actions
Related to openQA Tests (public) - action #34069: [sle][migration][sle15] Update snapper_rollback test module to check registration statusResolvedqmsu2018-03-30

Actions
Related to openQA Tests (public) - action #75295: [qe-core][opensuse][functional]test fails in shutdownRejected

Actions
Blocks openQA Tests (public) - action #55877: [qe-core][functional] Describe the process on how we get a Leap scenario to a TumbleweedFeedback2019-08-24

Actions
Copied from openQA Tests (public) - action #9580: Boot to snapshot after upgrade and then rollbackResolvedokurz2015-11-17

Actions
Actions

Also available in: Atom PDF