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 test boot_into_snapshot_after_upgrade #10919

Closed

Conversation

Zaoliang
Copy link
Contributor

@Zaoliang Zaoliang commented Aug 31, 2020

add boot_into_snapshot after upgrade from DVD installation
see https://progress.opensuse.org/issues/12964
verifications:
http://10.162.23.47/tests/8183 (BOOT_INTO_SNAPSHOT_AFTER_UPGRADE)
http://10.162.23.47/tests/8185 (SLES boot_into_snapshot)
http://10.162.23.47/tests/8184 (TW boot_into_snapshot)

@Zaoliang
Copy link
Contributor Author

Zaoliang commented Sep 4, 2020

http://10.162.23.47/tests/8022#step/boot_into_snapshot/8 for example.

And I can't see the need of it:
assert_script_run('touch /etc/NOWRITE;test ! -f /etc/NOWRITE');

@Zaoliang Zaoliang force-pushed the boot-into-snapshot-after-upgrade branch from cdb1767 to 84ad55d Compare September 4, 2020 09:41
@SergioAtSUSE
Copy link
Member

SergioAtSUSE commented Sep 7, 2020

http://10.162.23.47/tests/8022#step/boot_into_snapshot/8 for example.

That failed job is caused by a wrong use of module boot_into_snapshot, because the SUT was booted into the normal writable snapshot: http://10.162.23.47/tests/8022#step/boot_to_desktop/3

Please see: #10919 (comment)

@SergioAtSUSE
Copy link
Member

And I can't see the need of it:
assert_script_run('touch /etc/NOWRITE;test ! -f /etc/NOWRITE');

It is necessary to check if the SUT booted into a read-only snapshot.

@Zaoliang Zaoliang force-pushed the boot-into-snapshot-after-upgrade branch 2 times, most recently from f8099ce to a86233a Compare September 10, 2020 10:58
@Zaoliang Zaoliang changed the title Add test boot_into-snapshot after upgrade WIP: Add test boot_into_snapshot_after_upgrade and roll_back_after_upgrade Sep 10, 2020
@Zaoliang Zaoliang force-pushed the boot-into-snapshot-after-upgrade branch 2 times, most recently from ece1f0a to 7932662 Compare September 11, 2020 09:47
@Zaoliang Zaoliang changed the title WIP: Add test boot_into_snapshot_after_upgrade and roll_back_after_upgrade Add test boot_into_snapshot_after_upgrade and roll_back_after_upgrade Sep 14, 2020
@Zaoliang Zaoliang force-pushed the boot-into-snapshot-after-upgrade branch 7 times, most recently from 75cc0c3 to e2c5b54 Compare September 21, 2020 10:27
@Zaoliang Zaoliang force-pushed the boot-into-snapshot-after-upgrade branch from e2c5b54 to ae63464 Compare September 21, 2020 13:10
add boot_into_snapshot after upgrade from DVD installation
see https://progress.opensuse.org/issues/12964
verifications:
http://10.162.23.47/tests/8183 (BOOT_INTO_SNAPSHOT_AFTER_UPGRADE)
http://10.162.23.47/tests/8185 (SLES boot_into_snapshot)
http://10.162.23.47/tests/8184 (TW boot_into_snapshot)
@Zaoliang Zaoliang force-pushed the boot-into-snapshot-after-upgrade branch from ae63464 to 4092452 Compare September 24, 2020 10:53
@Zaoliang Zaoliang changed the title Add test boot_into_snapshot_after_upgrade and roll_back_after_upgrade Add test boot_into_snapshot_after_upgrade Sep 24, 2020
Copy link
Member

@SergioAtSUSE SergioAtSUSE left a comment

Choose a reason for hiding this comment

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

Let me propose the following.

  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 before rollback_from_ro_snapshot, which should take care of waiting for grub and booting into the RO snapshot.
  4. Verify changes on following scenarios

@@ -0,0 +1,22 @@
---
name: boot_into_snapshot_after_upgrade
Copy link
Member

Choose a reason for hiding this comment

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

In ticket, AC1 states: boot_into_snapshot is scheduled at the end of upgrade_Leap_15.1_gnome scenario (Leap->Tumbleweed) for the last Leap version.

There is no verification run for test suite upgrade_Leap_15.1_gnome.
And the creation of test suite boot_into_snapshot_after_upgrade is invalid.

assert_screen 'linux-login', 200;
select_console 'root-console';
# 1)
assert_script_run('touch /etc/NOWRITE;test ! -f /etc/NOWRITE');
Copy link
Member

Choose a reason for hiding this comment

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

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. In this case, the failure is a test bug, since the verification run http://10.162.23.47/tests/8183, shows the module boot_into_snapshot scheduled after:

  • grub_test (which is booting into default writable snapshot)
  • first_boot
  • opensuse_welcome

So, the changes on file tests/installation/boot_into_snapshot.pm are wrong.

@Zaoliang
Copy link
Contributor Author

Zaoliang commented Oct 6, 2020

re-worked according to ticket. Close this PR and please follow:

#11142

@Zaoliang Zaoliang closed this Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants