Sandesh/newbranch - #4694
Sandesh/newbranch#4694Sandygit01 wants to merge 12 commits into
Conversation
Hibernation tests share startstop.stop(Hibernate); Azure intermittently returns a transient VMHibernateFailed internal error that it documents as retryable. Retry that exact error up to 3 times, 30s apart, only while the VM is still running. Other failures and non-running states raise immediately as before.
On Debian the hibernation-setup tool writes resume=/resume_offset= to the bootloader, which only take effect after a reboot. Without it the guest accepts the hibernate uevent but never suspends, so Azure returns VMHibernateFailed on every attempt (seen on Debian 13). Extend the existing post-setup reboot workaround (already used for Redhat/AlmaLinux/SLES) to Debian. Exact type() match keeps Ubuntu unaffected.
Ubuntu 24.04 shows the same persistent VMHibernateFailed as Debian: the guest accepts the hibernate uevent but never suspends because the resume=/resume_offset= bootloader entries need a reboot to take effect. Ubuntu is a Debian subclass but the exact type() check did not cover it, so add Ubuntu explicitly. The list now covers all distros is_distro_supported allows.
This reverts commit f4add12.
There was a problem hiding this comment.
Pull request overview
This PR refactors LISA’s “requirement → selected value” API by renaming choose_value to generate_min_capability and updating all call sites (selftests, orchestrators, schema/helpers). It also updates several test requirements that previously depended on IntRange(…, choose_max_value=True) to instead request explicit minimums (e.g., NIC/disk counts), and adds additional hibernation precondition handling in the power test utilities.
Changes:
- Renames
choose_valueAPIs togenerate_min_capabilityacross search space types and updates orchestrators/selftests accordingly. - Removes
choose_max_valuefromIntRangeand adjusts test requirements that previously relied on “maximize” behavior. - Updates hibernation common logic to skip on FIPS kernels and reboot on additional distros after hibernation setup.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| selftests/test_search_space.py | Updates selftests to use generate_min_capability* APIs. |
| selftests/test_platform.py | Updates platform selftest to use generate_min_capability. |
| selftests/test_env_requirement.py | Updates env requirement selftests to new API naming. |
| selftests/azure/test_disk_feature.py | Updates Azure disk feature selftests to new API naming. |
| lisa/sut_orchestrator/openvmm/node.py | Switches count-space resolution helper to generate_min_capability_countspace. |
| lisa/sut_orchestrator/libvirt/platform.py | Updates node requirement selection to generate_min_capability. |
| lisa/sut_orchestrator/hyperv/platform_.py | Updates node requirement selection to generate_min_capability. |
| lisa/sut_orchestrator/baremetal/platform_.py | Updates node requirement selection to generate_min_capability. |
| lisa/sut_orchestrator/azure/platform_.py | Updates Azure platform “min capability” generation to call generate_min_capability. |
| lisa/sut_orchestrator/azure/features.py | Updates requirement-method dispatch to the renamed enum member. |
| lisa/sut_orchestrator/aws/platform_.py | Updates AWS platform “min capability” generation to call generate_min_capability. |
| lisa/sut_orchestrator/aws/features.py | Updates requirement-method dispatch to the renamed enum member. |
| lisa/search_space.py | Core API rename (choose_value→generate_min_capability), enum rename, and removal of choose_max_value. |
| lisa/schema.py | Updates schema requirement resolution (host type, node counts, cost) to use new API naming. |
| lisa/runners/lisa_runner.py | Updates platform requirement merge logic to use generate_min_capability_countspace. |
| lisa/microsoft/testsuites/power/power.py | Updates requirements to avoid removed “maximize” range behavior (explicit mins). |
| lisa/microsoft/testsuites/power/common.py | Adds FIPS-kernel skip and broadens reboot-after-setup to Debian/Ubuntu. |
| lisa/microsoft/testsuites/nvme/nvme.py | Updates NVMe “max disk” requirement to a fixed disk count and updates description. |
| lisa/microsoft/testsuites/network/synthetic.py | Updates requirements/descriptions for “max (8)” NIC cases; fixes needed for typos (see comments). |
| lisa/microsoft/testsuites/network/stress.py | Updates stress requirements to specify min NIC count + SR-IOV/Synthetic settings without max-range logic. |
| lisa/microsoft/testsuites/network/sriov.py | Updates SR-IOV requirements to explicit NIC counts / bounded ranges. |
| lisa/features/nvme.py | Updates NVMe settings min-capability selection to new API naming. |
| lisa/features/gpu.py | Renames requirement hook implementation to _generate_min_capability. |
| lisa/environment.py | Updates environment-space requirement selection to generate_min_capability and updates assertion message. |
Suppressed comments (3)
lisa/microsoft/testsuites/network/synthetic.py:58
- Typo in the test description (“provison”). Consider correcting it for readability.
This case verify VM works well when provison with max (8) synthetic nics.
lisa/microsoft/testsuites/network/synthetic.py:119
- Typo in the test description (“provison”). Consider correcting it for readability.
This case verify VM works well when provison with max (8) synthetic nics.
lisa/microsoft/testsuites/network/synthetic.py:88
- Typo in the test description (“provison”). Consider correcting it for readability.
This case verify VM works well when provison with max (8) synthetic nics.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @TestCaseMetadata( | ||
| description=""" | ||
| This case verify VM works well when provison with max synthetic nics. | ||
| This case verify VM works well when provison with max (8) synthetic nics. |
AI Test Case SelectionSelected 51 test case(s): verify_services_state,verify_sriov_basic,verify_sriov_single_vf_connection,verify_sriov_single_vf_connection_max_cpu,verify_sriov_max_vf_connection,verify_sriov_max_vf_connection_max_cpu,verify_sriov_disable_enable,verify_sriov_disable_enable_pci,verify_sriov_disable_enable_on_guest,verify_sriov_add_max_nics,verify_sriov_provision_with_max_nics,verify_sriov_provision_with_max_nics_reboot,verify_sriov_provision_with_max_nics_reboot_from_platform,verify_sriov_provision_with_max_nics_stop_start_from_platform,verify_sriov_reload_modules,verify_sriov_ethtool_offload_setting,verify_irqbalance,verify_sriov_interrupts_change,stress_sriov_iperf,stress_sriov_disable_enable,stress_sriov_with_max_nics_reboot,stress_sriov_with_max_nics_reboot_from_platform,stress_sriov_with_max_nics_stop_start_from_platform,stress_synthetic_provision_with_max_nics_reboot,stress_synthetic_with_max_nics_reboot_from_platform,stress_synthetic_with_max_nics_stop_start_from_platform,verify_synthetic_provision_with_max_nics,verify_synthetic_provision_with_max_nics_reboot,verify_synthetic_provision_with_max_nics_reboot_from_platform,verify_synthetic_provision_with_max_nics_stop_start_from_platform,verify_synthetic_add_max_nics_one_time_after_provision,verify_synthetic_add_max_nics_one_by_one_after_provision,verify_nvme_basic,verify_nvme_max_disk,verify_nvme_function,verify_nvme_function_unpartitioned,verify_nvme_fstrim,verify_nvme_blkdiscard,verify_nvme_manage_ns,verify_nvme_rescind,verify_nvme_sriov_rescind,verify_hibernation_synthetic_network,verify_hibernation_sriov_network,verify_hibernation_time_sync,verify_hibernation_with_network_workload,verify_hibernation_with_storage_workload,verify_hibernation_with_memory_workload,verify_hibernation_synthetic_network_max_nics,verify_hibernation_sriov_network_max_nics,verify_hibernation_max_data_disks,verify_hibernation_with_vm_extension Marketplace image: Result: Canceled |
|
Sandygit01 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Suppressed comments (5)
Previously missed (1) — in code that hasn't changed since the last review.
lisa/search_space.py:456
- generate_min_capability_countspace() can hit an AssertionError when requirement is None and capability is None/0/empty, because it sets result but leaves requirement as None and then falls through to the list-type assert. It also treats capability=0 as falsy, which is a valid CountSpace value (e.g. gpu_count).
if capability:
requirement = capability
result: int = sys.maxsize
else:
result = 0
lisa/microsoft/testsuites/network/synthetic.py:119
- Typo in description string: "provison" should be "provision".
This case verify VM works well when provison with max (8) synthetic nics.
lisa/microsoft/testsuites/network/synthetic.py:33
- Typo in description string: "provison" should be "provision".
This case verify VM works well when provison with max (8) synthetic nics.
lisa/microsoft/testsuites/network/synthetic.py:58
- Typo in description string: "provison" should be "provision".
This case verify VM works well when provison with max (8) synthetic nics.
lisa/microsoft/testsuites/network/synthetic.py:88
- Typo in description string: "provison" should be "provision".
This case verify VM works well when provison with max (8) synthetic nics.
| f"{_HIBERNATE_FAILED_MARKER}; retrying in " | ||
| f"{_HIBERNATE_RETRY_INTERVAL_SECONDS}s per Azure guidance" | ||
| ) | ||
| sleep(_HIBERNATE_RETRY_INTERVAL_SECONDS) |
Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results