Skip to content

Fail smoke test on reboot errors#4472

Open
vyadavmsft wants to merge 2 commits into
mainfrom
vyadav_may_fix2
Open

Fail smoke test on reboot errors#4472
vyadavmsft wants to merge 2 commits into
mainfrom
vyadav_may_fix2

Conversation

@vyadavmsft
Copy link
Copy Markdown
Collaborator

@vyadavmsft vyadavmsft commented May 10, 2026

Description

The smoke test currently only marks reboot failures as bad environment when the caught exception is TcpConnectionException. Other reboot failures from node.reboot(), such as a reboot timeout while waiting for the boot marker to advance, fall through to PassedException and make the test pass with a warning.

That creates a false positive for cases where the guest never completes reboot. The daily Cloud Hypervisor v51 smoke run hit this path with 'timeout to wait reboot, the node may stuck on reboot command' but still exited successfully.

Treat any exception from the reboot step as BadEnvironmentStateException after checking serial console panic, matching the existing comment that reboot connectivity failures should fail the test.

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:

Smoke test
Impacted LISA Features:

Smoke test

Tested Azure Marketplace Images:

Test Results

2026-05-19 03:21:10.574[139919805806400][INFO] lisa.RootRunner ________________________________________
2026-05-19 03:21:10.574[139919805806400][INFO] lisa.RootRunner Provisioning.smoke_test: PASSED
2026-05-19 03:21:10.574[139919805806400][INFO] lisa.RootRunner CPU.verify_cpu_count: PASSED

Image VM Size Result
PASSED / FAILED / SKIPPED

The smoke test currently only marks reboot failures as bad environment when the caught exception is TcpConnectionException. Other reboot failures from node.reboot(), such as a reboot timeout while waiting for the boot marker to advance, fall through to PassedException and make the test pass with a warning.

That creates a false positive for cases where the guest never completes reboot. The daily Cloud Hypervisor v51 smoke run hit this path with 'timeout to wait reboot, the node may stuck on reboot command' but still exited successfully.

Treat any exception from the reboot step as BadEnvironmentStateException after checking serial console panic, matching the existing comment that reboot connectivity failures should fail the test.
Copilot AI review requested due to automatic review settings May 10, 2026 23:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a false-positive behavior in the core provisioning smoke test by ensuring reboot failures don’t get downgraded into a partial pass. It aligns the runtime behavior with the intent that reboot issues indicate an unhealthy/bad environment.

Changes:

  • Treat any exception thrown during the reboot step as BadEnvironmentStateException (instead of only TcpConnectionException).
  • Preserve the original exception via chaining (raise ... from e) to keep debugging context.

Comment thread lisa/microsoft/testsuites/core/provisioning.py Outdated
Comment thread lisa/microsoft/testsuites/core/provisioning.py Outdated
@github-actions
Copy link
Copy Markdown

❌ AI Test Selection — FAILED

78 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 61
❌ Failed 3
⏭️ Skipped 14
Total 78
Test case details
Test Case Status Time (s) Message
verify_vmbus_devices_channels_bsd (lisa_0_1) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.BSD'>] but VM supports [<class 'lisa.operatin
verify_vmbus_devices_channels (lisa_0_2) ✅ PASSED 19.014
verify_vmbus_heartbeat_properties (lisa_0_3) ✅ PASSED 24.210
verify_bash_history_is_empty (lisa_0_52) ✅ PASSED 1.822
verify_default_targetpw (lisa_0_40) ✅ PASSED 3.177
verify_grub (lisa_0_41) ✅ PASSED 1.940
verify_network_file_configuration (lisa_0_43) ⏭️ SKIPPED 0.357 skipped: unsupported distro type: <class 'lisa.operating_system.Ubuntu'>
verify_ifcfg_eth0 (lisa_0_44) ⏭️ SKIPPED 0.228 skipped: unsupported distro type: <class 'lisa.operating_system.Ubuntu'>
verify_udev_rules_moved (lisa_0_45) ⏭️ SKIPPED 0.224 skipped: Unsupported distro type : <class 'lisa.operating_system.Ubuntu'>
verify_dhcp_file_configuration (lisa_0_46) ⏭️ SKIPPED 0.366 skipped: Unsupported distro type : <class 'lisa.operating_system.Ubuntu'>
verify_serial_console_is_enabled (lisa_0_51) ✅ PASSED 3.399
verify_no_pre_exist_users (lisa_0_56) ✅ PASSED 3.945
verify_waagent_version (lisa_0_59) ✅ PASSED 2.447
verify_python_version (lisa_0_60) ✅ PASSED 1.899
verify_openssl_version (lisa_0_61) ✅ PASSED 1.989
verify_azure_64bit_os (lisa_0_62) ✅ PASSED 2.096
verify_resource_disk_file_system (lisa_0_58) ✅ PASSED 9.687
verify_omi_version (lisa_0_63) ✅ PASSED 2.562
verify_no_swap_on_osdisk (lisa_0_64) ✅ PASSED 2.077
verify_essential_kernel_modules (lisa_0_65) ✅ PASSED 2.795
verify_repository_installed (lisa_0_50) ✅ PASSED 38.646
verify_yum_conf (lisa_0_47) ⏭️ SKIPPED 0.244 skipped: Unsupported distro type : <class 'lisa.operating_system.Ubuntu'>
verify_os_update (lisa_0_48) ✅ PASSED 35.055
verify_hv_kvp_daemon_installed (lisa_0_49) ✅ PASSED 1.849
verify_cloud_init_error_status (lisa_0_54) ⏭️ SKIPPED 0.244 skipped: Unsupported system: 'Ubuntu 22.04.5 LTS'. unsupported distro to run verify_cloud_init test.
verify_client_active_interval (lisa_0_55) ✅ PASSED 2.300
verify_resource_disk_readme_file (lisa_0_57) ✅ PASSED 5.141
verify_network_manager_not_installed (lisa_0_42) ⏭️ SKIPPED 0.360 skipped: unsupported distro type: <class 'lisa.operating_system.Ubuntu'>
verify_boot_error_fail_warnings (lisa_0_53) ❌ FAILED 13.341 failed. AssertionError: [unexpected error/failure/warnings shown up in bootup log of distro Ubuntu 22.4.0] Expected <['M
verify_enable_kprobe (lisa_0_4) ✅ PASSED 12.824
verify_serial_console (lisa_0_0) ✅ PASSED 51.569
verify_l3_cache (lisa_0_37) ✅ PASSED 2.187
verify_cpu_count (lisa_0_38) ✅ PASSED 2.248
verify_vmbus_interrupts (lisa_0_39) ❌ FAILED 3.669 failed. AssertionError: [Hypervisor synthetic timer interrupt should be processed by all vCPU's] Expected to be
verify_dhcp_client_timeout (lisa_0_9) ✅ PASSED 2.479
verify_dns_name_resolution (lisa_0_75) ✅ PASSED 4.400
verify_dns_name_resolution_after_upgrade (lisa_0_76) ✅ PASSED 71.511
verify_floppy_module_is_blacklisted (lisa_0_5) ✅ PASSED 1.821
verify_hyperv_modules (lisa_0_29) ✅ PASSED 6.560
verify_initrd_modules (lisa_0_28) ✅ PASSED 70.593
verify_lis_modules_version (lisa_0_27) ⏭️ SKIPPED 0.245 skipped: Ubuntu not supported. This test case only supports Redhat distros.
verify_reload_hyperv_modules (lisa_0_30) ✅ PASSED 188.365
verify_kvp (lisa_0_31) ✅ PASSED 11.495
verify_resource_disk_mounted (lisa_0_11) ✅ PASSED 7.743
verify_swap (lisa_0_12) ✅ PASSED 3.439
verify_resource_disk_io (lisa_0_13) ✅ PASSED 8.239
verify_scsi_disk_controller_type (lisa_0_14) ✅ PASSED 3.201
verify_os_partition_identifier (lisa_0_16) ✅ PASSED 2.970
verify_disks_device_timeout_setting (lisa_0_10) ✅ PASSED 3.478
verify_nvme_disk_controller_type (lisa_0_15) ✅ PASSED 10.092
verify_hot_add_disk_serial (lisa_0_17) ✅ PASSED 212.602
verify_hot_add_disk_serial_standard_ssd (lisa_0_18) ✅ PASSED 290.181
verify_hot_add_disk_parallel (lisa_0_20) ✅ PASSED 19.555
verify_hot_add_disk_serial_premium_ssd (lisa_0_19) ✅ PASSED 264.601
verify_hot_add_disk_parallel_standard_ssd (lisa_0_21) ✅ PASSED 85.330
verify_hot_add_disk_parallel_premium_ssd (lisa_0_24) ✅ PASSED 53.573
verify_cifs_basic (lisa_0_26) ❌ FAILED 28.026 failed. ResourceNotFoundError: (ResourceNotFound) The Resource 'Microsoft.Storage/storageAccounts/lisafs21p9htgr24' unde
verify_nfsv4_basic (lisa_0_25) ✅ PASSED 205.859
verify_hot_add_disk_serial_random_lun_premium_ssd (lisa_0_23) ✅ PASSED 335.623
verify_hot_add_disk_serial_random_lun_standard_ssd (lisa_0_22) ✅ PASSED 375.567
verify_hyperv_platform_id (lisa_0_32) ✅ PASSED 39.223
verify_pmu_disabled_for_arm64 (lisa_0_71) ⏭️ SKIPPED 0.253 skipped: This test case does not support CpuArchitecture.X64. This validation is only for ARM64.
verify_timedrift_corrected (lisa_0_72) ✅ PASSED 75.758
verify_timesync_ptp (lisa_0_66) ✅ PASSED 3.861
verify_timesync_unbind_clocksource (lisa_0_67) ✅ PASSED 25.565
verify_timesync_unbind_clockevent (lisa_0_68) ✅ PASSED 2.414
verify_timesync_chrony (lisa_0_70) ✅ PASSED 26.838
verify_timesync_ntp (lisa_0_69) ✅ PASSED 46.624
verify_vdso (lisa_0_7) ✅ PASSED 150.008
verify_vm_resize_decrease (lisa_0_36) ✅ PASSED 188.690
verify_vm_hot_resize (lisa_0_33) ✅ PASSED 720.511
verify_vm_hot_resize_decrease (lisa_0_34) ✅ PASSED 700.642
verify_vm_resize_increase (lisa_0_35) ✅ PASSED 861.474
verify_gdb (lisa_0_6) ✅ PASSED 14.017
verify_sched_core_basic (lisa_0_8) ⏭️ SKIPPED 0.234 before_case skipped: Unsupported system: 'Ubuntu 22.04.5 LTS'. SCHED_CORE support is only tested on AzureLinux 3.0 and l
verify_boot_with_debug_kernel (lisa_0_77) ⏭️ SKIPPED 0.234 skipped: Ubuntu not supported. This test case only supports redhat/centos distro.
verify_zram_crypto_zstd (lisa_0_73) ⏭️ SKIPPED 0.256 before_case skipped: Unsupported system: 'Ubuntu 22.04.5 LTS'. zram compression test requires Azure Linux 3.0+.
verify_zram_crypto_lz4 (lisa_0_74) ⏭️ SKIPPED 0.242 before_case skipped: Unsupported system: 'Ubuntu 22.04.5 LTS'. zram compression test requires Azure Linux 3.0+.

@vyadavmsft
Copy link
Copy Markdown
Collaborator Author

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

@copilot apply changes based on the comments in this thread

Applied the requested review-thread updates in aa2275e: updated the inline comment to reflect that any reboot exception marks bad environment state, and made the exception message actionable with node name plus serial-console/reachability hints.

@github-actions
Copy link
Copy Markdown

❌ AI Test Selection — FAILED

78 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 61
❌ Failed 3
⏭️ Skipped 14
Total 78
Test case details
Test Case Status Time (s) Message
verify_serial_console (lisa_0_0) ✅ PASSED 40.341
verify_vmbus_devices_channels_bsd (lisa_0_1) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.BSD'>] but VM supports [<class 'lisa.operatin
verify_vmbus_heartbeat_properties (lisa_0_3) ✅ PASSED 13.827
verify_vmbus_devices_channels (lisa_0_2) ✅ PASSED 12.168
verify_enable_kprobe (lisa_0_4) ✅ PASSED 7.712
verify_bash_history_is_empty (lisa_0_52) ✅ PASSED 0.836
verify_grub (lisa_0_41) ✅ PASSED 1.645
verify_default_targetpw (lisa_0_40) ✅ PASSED 3.023
verify_ifcfg_eth0 (lisa_0_44) ⏭️ SKIPPED 0.253 skipped: unsupported distro type: <class 'lisa.operating_system.Ubuntu'>
verify_udev_rules_moved (lisa_0_45) ⏭️ SKIPPED 0.215 skipped: Unsupported distro type : <class 'lisa.operating_system.Ubuntu'>
verify_dhcp_file_configuration (lisa_0_46) ⏭️ SKIPPED 0.220 skipped: Unsupported distro type : <class 'lisa.operating_system.Ubuntu'>
verify_serial_console_is_enabled (lisa_0_51) ✅ PASSED 1.130
verify_network_file_configuration (lisa_0_43) ⏭️ SKIPPED 2.821 skipped: unsupported distro type: <class 'lisa.operating_system.Ubuntu'>
verify_no_pre_exist_users (lisa_0_56) ✅ PASSED 2.213
verify_resource_disk_file_system (lisa_0_58) ✅ PASSED 4.141
verify_waagent_version (lisa_0_59) ✅ PASSED 1.359
verify_openssl_version (lisa_0_61) ✅ PASSED 1.042
verify_python_version (lisa_0_60) ✅ PASSED 2.223
verify_azure_64bit_os (lisa_0_62) ✅ PASSED 1.114
verify_omi_version (lisa_0_63) ✅ PASSED 1.243
verify_no_swap_on_osdisk (lisa_0_64) ✅ PASSED 1.075
verify_essential_kernel_modules (lisa_0_65) ✅ PASSED 1.491
verify_repository_installed (lisa_0_50) ✅ PASSED 23.042
verify_yum_conf (lisa_0_47) ⏭️ SKIPPED 0.212 skipped: Unsupported distro type : <class 'lisa.operating_system.Ubuntu'>
verify_os_update (lisa_0_48) ✅ PASSED 38.568
verify_hv_kvp_daemon_installed (lisa_0_49) ✅ PASSED 1.183
verify_cloud_init_error_status (lisa_0_54) ⏭️ SKIPPED 0.236 skipped: Unsupported system: 'Ubuntu 22.04.5 LTS'. unsupported distro to run verify_cloud_init test.
verify_client_active_interval (lisa_0_55) ✅ PASSED 1.148
verify_resource_disk_readme_file (lisa_0_57) ✅ PASSED 3.836
verify_network_manager_not_installed (lisa_0_42) ⏭️ SKIPPED 0.161 skipped: unsupported distro type: <class 'lisa.operating_system.Ubuntu'>
verify_boot_error_fail_warnings (lisa_0_53) ❌ FAILED 8.941 failed. AssertionError: [unexpected error/failure/warnings shown up in bootup log of distro Ubuntu 22.4.0] Expected <['M
verify_cpu_count (lisa_0_38) ✅ PASSED 0.230
verify_l3_cache (lisa_0_37) ✅ PASSED 2.510
verify_vmbus_interrupts (lisa_0_39) ✅ PASSED 2.479
verify_dhcp_client_timeout (lisa_0_9) ✅ PASSED 1.273
verify_dns_name_resolution (lisa_0_75) ✅ PASSED 2.200
verify_dns_name_resolution_after_upgrade (lisa_0_76) ✅ PASSED 72.151
verify_hyperv_modules (lisa_0_29) ✅ PASSED 3.223
verify_initrd_modules (lisa_0_28) ✅ PASSED 59.263
verify_lis_modules_version (lisa_0_27) ⏭️ SKIPPED 0.172 skipped: Ubuntu not supported. This test case only supports Redhat distros.
verify_reload_hyperv_modules (lisa_0_30) ✅ PASSED 179.866
verify_kvp (lisa_0_31) ✅ PASSED 4.776
verify_hyperv_platform_id (lisa_0_32) ✅ PASSED 34.198
verify_resource_disk_mounted (lisa_0_11) ✅ PASSED 3.245
verify_swap (lisa_0_12) ✅ PASSED 1.799
verify_resource_disk_io (lisa_0_13) ✅ PASSED 3.854
verify_scsi_disk_controller_type (lisa_0_14) ✅ PASSED 0.308
verify_os_partition_identifier (lisa_0_16) ✅ PASSED 3.179
verify_cifs_basic (lisa_0_26) ❌ FAILED 23.241 failed. ResourceNotFoundError: (ResourceNotFound) The Resource 'Microsoft.Storage/storageAccounts/lisafshgavd4dq0j' unde
verify_disks_device_timeout_setting (lisa_0_10) ✅ PASSED 1.921
verify_nvme_disk_controller_type (lisa_0_15) ✅ PASSED 6.617
verify_hot_add_disk_serial_standard_ssd (lisa_0_18) ✅ PASSED 268.756
verify_hot_add_disk_serial (lisa_0_17) ✅ PASSED 293.994
verify_hot_add_disk_parallel_standard_ssd (lisa_0_21) ✅ PASSED 69.894
verify_hot_add_disk_serial_premium_ssd (lisa_0_19) ✅ PASSED 414.438
verify_hot_add_disk_parallel (lisa_0_20) ✅ PASSED 202.978
verify_hot_add_disk_parallel_premium_ssd (lisa_0_24) ✅ PASSED 109.239
verify_hot_add_disk_serial_random_lun_standard_ssd (lisa_0_22) ✅ PASSED 229.417
verify_nfsv4_basic (lisa_0_25) ✅ PASSED 153.303
verify_hot_add_disk_serial_random_lun_premium_ssd (lisa_0_23) ✅ PASSED 383.755
verify_floppy_module_is_blacklisted (lisa_0_5) ✅ PASSED 2.205
verify_pmu_disabled_for_arm64 (lisa_0_71) ⏭️ SKIPPED 1.734 skipped: This test case does not support CpuArchitecture.X64. This validation is only for ARM64.
verify_timedrift_corrected (lisa_0_72) ✅ PASSED 73.986
verify_timesync_ptp (lisa_0_66) ✅ PASSED 2.105
verify_timesync_unbind_clocksource (lisa_0_67) ✅ PASSED 27.307
verify_timesync_unbind_clockevent (lisa_0_68) ❌ FAILED 1.315 failed. AssertionError: [Expected clockevent name is Hyper-V clockevent, but actual it is lapic.] Expected to be
verify_timesync_ntp (lisa_0_69) ✅ PASSED 26.987
verify_timesync_chrony (lisa_0_70) ✅ PASSED 32.338
verify_vdso (lisa_0_7) ✅ PASSED 117.334
verify_vm_hot_resize (lisa_0_33) ✅ PASSED 46.673
verify_vm_resize_increase (lisa_0_35) ✅ PASSED 138.931
verify_vm_hot_resize_decrease (lisa_0_34) ✅ PASSED 698.141
verify_vm_resize_decrease (lisa_0_36) ✅ PASSED 819.489
verify_gdb (lisa_0_6) ✅ PASSED 76.095
verify_sched_core_basic (lisa_0_8) ⏭️ SKIPPED 0.164 before_case skipped: Unsupported system: 'Ubuntu 22.04.5 LTS'. SCHED_CORE support is only tested on AzureLinux 3.0 and l
verify_boot_with_debug_kernel (lisa_0_77) ⏭️ SKIPPED 0.162 skipped: Ubuntu not supported. This test case only supports redhat/centos distro.
verify_zram_crypto_zstd (lisa_0_73) ⏭️ SKIPPED 0.151 before_case skipped: Unsupported system: 'Ubuntu 22.04.5 LTS'. zram compression test requires Azure Linux 3.0+.
verify_zram_crypto_lz4 (lisa_0_74) ⏭️ SKIPPED 0.155 before_case skipped: Unsupported system: 'Ubuntu 22.04.5 LTS'. zram compression test requires Azure Linux 3.0+.

@vyadavmsft
Copy link
Copy Markdown
Collaborator Author

@LiliDeng pls check

@vyadavmsft
Copy link
Copy Markdown
Collaborator Author

@LiliDeng @johnsongeorge-w can you pls check.

@vyadavmsft
Copy link
Copy Markdown
Collaborator Author

@johnsongeorge-w @LiliDeng pls check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants