Test parameter determination method and apparatus, electronic device, and storage medium

By automatically calculating the test parameters of the storage cluster, the problem of LUN configuration parameters relying on human experience is solved, and efficient and accurate fault simulation in complex test scenarios is achieved, ensuring the authenticity and rationality of the test results.

CN122633482APending Publication Date: 2026-08-25ZHENGZHOU INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610711142.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-21
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

In existing technologies, the determination of LUN configuration parameters relies on human experience, which leads to inaccurate configuration in complex testing scenarios and affects the authenticity and reliability of fault simulation tests.

Method used

By obtaining the storage cluster type and cluster status value, the first and second storage pools are determined, and the first and second test parameter sets are automatically calculated based on their type and attribute information, thereby determining the target test parameter values, covering a variety of complex test scenarios, and ensuring that the parameters meet actual needs.

Benefits of technology

It improves the accuracy and realism of fault simulation testing, shortens testing time, avoids errors caused by manual estimation, and ensures the rationality and efficiency of test scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122633482A_ABST
    Figure CN122633482A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computer, and discloses a test parameter determination method and device, electronic equipment and storage medium, since the storage cluster type and cluster state value are acquired first, the first storage pool is determined, and the first test parameter set is determined according to the type, attribute information and cluster state value, and then the first test parameter value is determined, then the second storage pool is determined according to the storage cluster type and the first storage pool type, the second test pool parameter set is determined according to the type, attribute information and corresponding cluster state value, and then the second test parameter value is determined, finally, the target test parameter value is determined according to the first test parameter value and the second test parameter value, a variety of complex test scenarios are covered through different storage cluster types and cluster state values, and then the target test parameter value meeting the actual test requirements is determined through the first test parameter value and the second test parameter value meeting the constraint conditions, so that the accuracy and authenticity of the test are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically to a method, apparatus, electronic device, and storage medium for determining test parameters. Background Technology

[0002] Extended cluster technology is a solution for achieving dual-active data centers. Therefore, it is necessary to conduct fault testing on extended clusters. During the testing process, multiple logical units (LUNs) need to be created in the storage pool to simulate actual business load. The configuration parameters of the LUNs need to match the test scenario, that is, match the type and usage status of the storage pool. Otherwise, it is impossible to simulate the real business environment, which will affect the test results.

[0003] In related technologies, the determination of LUN configuration parameters usually relies on human experience. In complex test scenarios, there are multiple parameter constraints, which makes the manually configured LUN configuration parameters inaccurate. This leads to a mismatch between the configuration parameters and the test scenario, causing anomalies such as storage pool overflow, and reducing the realism of fault simulation tests. Summary of the Invention

[0004] This application provides a method, apparatus, electronic device, and storage medium for determining test parameters, in order to at least solve the problem in the related art that the LUN configuration parameters cannot be accurately determined, resulting in low realism of fault simulation tests.

[0005] This application provides a method for determining test parameters, including: Get the storage cluster type and cluster status value; The first storage pool is determined based on the storage cluster type and cluster status value; The first test parameter set is determined based on the type and attribute information represented by the first storage pool and the corresponding cluster status value; Determine the value of the first test parameter based on the first test parameter set; The second storage pool is determined based on the storage cluster type and the first storage pool type; wherein, the storage cluster includes the first storage pool and the second storage pool. The second set of test parameters is determined based on the type and attribute information of the second storage pool and the corresponding cluster status value. Determine the value of the second test parameter based on the second test parameter set; Determine the target test parameter value based on the first test parameter value and the second test parameter value; The target test parameter values ​​include at least the target configuration parameters of the logical units when testing the storage cluster.

[0006] This application also provides a test parameter determination device, including: The acquisition module is used to obtain the storage cluster type and cluster status value; The first storage pool determination module is used to determine the first storage pool based on the storage cluster type and cluster status value; The first parameter set determination module is used to determine the first test parameter set based on the type and attribute information represented by the first storage pool and the corresponding cluster status value. The first parameter determination module is used to determine the value of the first test parameter based on the first test parameter set; The second storage pool determination module is used to determine the second storage pool based on the storage cluster type and the first storage pool type; wherein the storage cluster includes the first storage pool and the second storage pool. The second parameter set determination module is used to determine the second test parameter set based on the type and attribute information represented by the second storage pool and the corresponding cluster status value. The second parameter determination module is used to determine the value of the second test parameter based on the second test parameter set. The target parameter determination module is used to determine the target test parameter value based on the first test parameter value and the second test parameter value. The target test parameter values ​​include at least the target configuration parameters of the logical units when testing the storage cluster.

[0007] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described test parameter determination methods.

[0008] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described test parameter determination methods.

[0009] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described test parameter determination methods.

[0010] This application achieves several improvements by first obtaining the storage cluster type and cluster status value to determine the first storage pool, and then determining the first test parameter set based on its type, attribute information, and cluster status value, thereby determining the first test parameter value. Next, based on the storage cluster type and the first storage pool type, the second storage pool is determined, and based on its type, attribute information, and corresponding cluster status value, the second test pool parameter set is determined, thereby determining the second test parameter value. Finally, based on the first and second test parameter values, the target test parameter value is determined. By using different storage cluster types and cluster status values, various complex test scenarios are covered. Furthermore, by determining the first and second test parameter values ​​that meet the constraints, the target test parameter value that meets the actual test requirements is determined, improving the accuracy and realism of the test. Attached Figure Description

[0011] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a schematic diagram of the test parameter determination system on which the embodiments of this application are based; Figure 2 A flowchart illustrating the test parameter determination method provided in this application embodiment; Figure 3 A schematic diagram illustrating an exemplary process for determining test parameters provided in this application embodiment; Figure 4 A schematic diagram illustrating the structure for determining exemplary test parameters provided in this application embodiment; Figure 5 This is a schematic diagram of the test parameter determination device provided in the embodiments of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0014] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0015] Extended clustering technology, as a core solution for achieving active-active data centers, has been widely used in high-availability architectures in industries such as finance and telecommunications. Active-active data centers achieve RPO=0 at the storage layer through synchronous writes to dual replicas, and disaster recovery at the compute layer, enabling cross-data center migration. The storage replication network must maintain a latency of ≤5ms. However, current testing scenarios are fixed, only verifying basic failure scenarios such as single-node failures. Data preparation is rudimentary, without considering the capacity characteristics differences between different storage types, such as all-flash or hybrid flash. Automation is low, requiring manual configuration of storage pool parameters for each test.

[0016] In related technologies, the test scenario coverage is insufficient, and it cannot automatically adapt to different storage type combinations, such as mixed flash-all flash, mixed flash-mixed flash, all flash-all flash, or all flash-mixed flash. Manual testing is difficult to cover complex scenarios involving cache normal / adjust / reclaim and capacity percentage. Furthermore, test data preparation is inefficient, requiring manual calculation of storage pool capacity constraints, which is prone to errors, such as ignoring the cache capacity limit of the mixed flash pool. LUN creation compatibility verification between dual-active storage pools relies entirely on manual experience. Fault detection reliability is poor; existing tools cannot simulate cascading failures caused by differences in storage types, such as all flash pool response delays triggering mixed flash pool overflows.

[0017] To address the aforementioned technical problems, this application provides a method, apparatus, electronic device, and storage medium for determining test parameters. The method includes: acquiring a storage cluster type and cluster status values; determining a first storage pool based on the storage cluster type and cluster status values; determining a first test parameter set based on the type and attribute information represented by the first storage pool and the corresponding cluster status value; determining a first test parameter value based on the first test parameter set; determining a second storage pool based on the storage cluster type and the first storage pool type; wherein the storage cluster includes the first storage pool and the second storage pool; determining a second test parameter set based on the type and attribute information represented by the second storage pool and the corresponding cluster status value; determining a second test parameter value based on the second test parameter set; and determining a target test parameter value based on the first test parameter value and the second test parameter value; wherein the target test parameter value includes at least the target configuration parameters of the logical units when testing the storage cluster. The method provided by the above solution first obtains the storage cluster type and cluster status value to determine the first storage pool, and then determines the first test parameter set based on its type, attribute information, and cluster status value, thereby determining the first test parameter value. Next, based on the storage cluster type and the first storage pool type, the second storage pool is determined, and based on its type, attribute information, and corresponding cluster status value, the second test pool parameter set is determined, thereby determining the second test parameter value. Finally, based on the first and second test parameter values, the target test parameter value is determined. By using different storage cluster types and cluster status values, various complex test scenarios are covered. Furthermore, by determining the first and second test parameter values ​​that meet the constraints, the target test parameter value that meets the actual test requirements is determined, thus improving the accuracy and realism of the test.

[0018] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] The specific application environment architecture or specific hardware architecture on which the method execution depends is determined by combining test parameters, and the specific application environment architecture or specific hardware architecture is described here.

[0020] First, the structure of the system determined based on the test parameters in this application will be described: The test parameter determination method, apparatus, electronic device, and storage medium provided in this application are applicable to determining test parameters according to different test scenarios, such as... Figure 1The diagram shows the structure of the test parameter determination system based on the embodiments of this application. It mainly includes the target test parameter value to be determined, a data acquisition device, and a test parameter determination device. The data acquisition device is used to acquire the storage cluster type and cluster status values. The test parameter determination device is used to determine the test parameters according to different test scenarios based on the test parameter determination method provided in the embodiments of this application.

[0021] This application provides a method for determining test parameters, used to determine test parameters according to different test scenarios. The execution subject of this application embodiment is an electronic device, such as a server, desktop computer, laptop computer, tablet computer, and other electronic devices that can be used to determine test parameters.

[0022] like Figure 2 The diagram shown is a flowchart illustrating a test parameter determination method provided in an embodiment of this application. The method includes: Step 201: Obtain the storage cluster type and cluster status value.

[0023] Specifically, the storage cluster includes a first storage pool and a second storage pool. Each storage pool can be either a mixed flash type or an all-flash type. When a storage pool is of mixed flash type, it consists of at least two types of storage media; when a storage pool is of all-flash type, it consists of only one type of storage media. Typically, a mixed flash storage pool consists of both hard disk drives (HDDs) and solid-state drives (SDDs), while an all-flash storage pool consists only of SDDs.

[0024] Storage cluster types include "mixed flash-full flash", "mixed flash-mixed flash", "full flash-full flash" and "full flash-mixed flash". Cluster status values ​​include cache normal, cache adjust and cache reclaim, as well as different proportions of usage capacity. Among them, cache normal, cache adjust and cache reclaim represent different usage capacity states of the storage pool.

[0025] Correspondingly, through four combinations of "mixed flash-full flash", "mixed flash-mixed flash", "full flash-full flash", and "full flash-mixed flash", the test scenarios are covered to include various storage types in the storage pool under the dual-active data center architecture. The cluster status values ​​cover various usage states of the storage pool. By combining different cluster status values ​​under different storage cluster types, the test scenarios are expanded to more closely resemble the actual usage state of the storage pool, thus improving the realism of the simulation test. At the same time, compared with the traditional manual determination of test scenarios, the time is shortened from 4-6 hours to 3 minutes, improving the efficiency of test scenario generation.

[0026] Step 202: Determine the first storage pool based on the storage cluster type and cluster status value.

[0027] Specifically, the type of the first storage pool is determined based on the cluster status value and the storage cluster type. If the cluster status value is cache_normal, cache_adjust, or cache_reclaim, the first storage pool is determined to be a mixed flash type. If the cluster status value indicates different proportions of usage capacity, the first storage pool is determined to be an all-flash type.

[0028] Step 203: Determine the first test parameter set based on the type and attribute information represented by the first storage pool and the corresponding cluster status value.

[0029] Specifically, the attribute information of the first storage pool includes the capacity size, preset number of nodes and preset number of replicas of the storage pool, and the corresponding cluster status value includes the usage status of the first storage pool, which represents the target usage status to be simulated by the first storage pool. The first test parameter set includes multiple optional logical unit target configuration parameters (LUN) for testing the storage cluster, thereby determining the parameter constraints of the first storage pool when performing the test.

[0030] Step 204: Determine the value of the first test parameter based on the first test parameter set.

[0031] Specifically, when the first storage pool is a mixed flash configuration, the first test parameter value is determined based on the LUN size corresponding to the HDD and the LUN size corresponding to the SSD, according to a preset rule. When the first storage pool is an all-flash configuration, the first test parameter value is determined based on the LUN size corresponding to the SSD, typically with the preset rule being to take the minimum value.

[0032] Accordingly, based on the type, attribute information, and cluster status value of the first storage pool, the constraints on the target test parameter values ​​were quantified, avoiding reliance on manual estimation and improving the accuracy of test parameter determination.

[0033] Step 205: Determine the second storage pool based on the storage cluster type and the first storage pool type. The storage cluster includes both the first and second storage pools.

[0034] Specifically, the type of the second storage pool is determined based on the storage cluster type and the first storage pool type. For example, if the storage cluster type is "mixed flash-all flash" and the first storage pool type is mixed flash, then the second storage pool type is all flash; if the storage cluster type is "mixed flash-mixed flash" and the first storage pool type is mixed flash, then the second storage pool type is mixed flash; if the storage cluster type is "all flash-all flash" and the first storage pool type is all flash, then the second storage pool type is all flash; if the storage cluster type is "all flash-mixed flash" and the first storage pool type is all flash, then the second storage pool type is mixed flash.

[0035] Step 206: Determine the second test parameter set based on the type and attribute information represented by the second storage pool and the corresponding cluster status value.

[0036] Specifically, the attribute information of the second storage pool includes the capacity size, preset number of nodes and preset number of replicas of the storage pool, and the corresponding cluster status value includes the usage status of the second storage pool, which represents the target usage status to be simulated by the second storage pool. The second test parameter set includes multiple optional logical unit target configuration parameters (LUN) used to test the storage cluster, thereby determining the parameter constraints of the second storage pool when performing the test.

[0037] Step 207: Determine the value of the second test parameter based on the second test parameter set.

[0038] Specifically, when the second storage pool is a mixed flash memory, the second test parameter value is determined based on the LUN size corresponding to the HDD and the LUN size corresponding to the SSD, according to a preset rule. When the first storage pool is an all-flash memory, the second test parameter value is determined based on the LUN size corresponding to the SSD, typically with the preset rule being to take the minimum value.

[0039] Accordingly, based on the type, attribute information, and cluster status value of the second storage pool, the constraints on the target test parameter values ​​were quantified, avoiding reliance on manual estimation and improving the accuracy of test parameter determination.

[0040] Step 208: Determine the target test parameter value based on the first test parameter value and the second test parameter value.

[0041] The target test parameter values ​​include at least the target configuration parameters of the logical units when testing the storage cluster.

[0042] Specifically, since multiple storage pools in a dual-active data center need to use unified and compatible test parameters, a target test parameter value is determined based on the first test parameter value and the second test parameter value, i.e., the test parameter value that satisfies the constraints of the first storage pool and the second storage pool, according to preset rules. This target test parameter value does not exceed the maximum feasible configuration parameter of any storage pool.

[0043] For example, such as Figure 3 The diagram shown is an exemplary flowchart of the test parameter determination process provided in this application embodiment. Based on the storage cluster type and cluster status value, multiple parameter combinations, i.e., multiple test scenarios, are determined. First, based on the cluster status value, it is determined whether the storage cluster type is reasonable and valid. If invalid, an exception is thrown directly. If valid, a first storage pool is further determined, and a first test parameter value is calculated. Then, based on the storage cluster type and the first storage pool type, a second storage pool is determined. Based on the type, attribute information, and corresponding cluster status value of the second storage pool, a second test parameter value is determined. Finally, based on the first and second test parameter values, a target test parameter value is determined.

[0044] Correspondingly, since the multiple storage pools in a dual-active data center have different types and usage states, but need to use unified and compatible test parameters, the corresponding constraints are determined according to the type of each storage pool and the cluster usage state. Then, by combining multiple constraints, the target test parameter value is determined. This enables the automatic calculation of reasonable test parameters in complex test scenarios, avoiding the problems of unreasonable test parameters and test case failures caused by manually determining parameters due to the complexity of the test scenario. At the same time, reasonable target test parameter values ​​enable the automatic maintenance of pressure balance among the storage pools in the dual-active architecture, avoiding test distortion caused by overload of a single pool.

[0045] Based on the above embodiments, as an implementable approach, in one embodiment, determining a first storage pool according to the storage cluster type and cluster status value includes: Step 2021: If the cluster status value is the cache status value and the storage cluster type includes hybrid type, determine that the first storage pool type is hybrid type. Step 2022: If the cluster status value is the usage status value and the storage cluster type includes non-hybrid type, determine that the first storage pool type is non-hybrid type.

[0046] Specifically, cache status values ​​include three types: cache_normal, cache_adjust, or cache_reclaim. Storage cluster types include "mixed flash-all flash", "mixed flash-mixed flash", "all flash-all flash", and "all flash-mixed flash", with mixed flash being a mixed type and all flash being a non-mixed type. Usage status values ​​include different percentages of used capacity, such as 20% or 50% of the used capacity.

[0047] If the cluster status value includes the cache status value and the storage cluster type includes mixed flash, the first storage pool is determined to be mixed flash, i.e., hybrid type. If the cluster status value does not include the cache status value, i.e. includes the usage status value, and the storage cluster type includes all flash, the first storage pool is determined to be all flash, i.e., non-mixed type.

[0048] Furthermore, if the cluster status value includes the usage status value, and the storage cluster type only includes all-flash (i.e., the storage cluster type is "all-flash-all-flash"), then the test scenario is deemed unreasonable. If the cluster status value is the cache status value, and the storage cluster type only includes mixed flash (i.e., the storage cluster type is "mixed flash-mixed flash"), then the test scenario is deemed unreasonable.

[0049] Specifically, parameter validity is validated using the following code: Parameter 1 (Storage Cluster Type): Mixed Flash - Full Flash, Mixed Flash - Mixed Flash, Full Flash - Full Flash, Full Flash - Mixed Flash; Parameter 2 (Cluster Usage Status): cache_normal, cache_adjust, cache_reclaim, Usage_20%, Usage_50%; def calculate_lun_size(param1, param2): # Parameter validity verification (converting test parameters into storage pool constraints) If "flashover-flashover" appears in param1 and param2.startswith("used capacity"): #If parameter 1 only contains the word "flashover" and parameter 2 starts with "use capacity", then the scenario is unreasonable.

[0050] raise ValueError("Hybrid flash pool does not support capacity percentage parameter") If "full flash - full flash" appears in param1 and param2, startswith("cache"): #If parameter 1 only contains the word "full flash" and parameter 2 starts with "cache", then the scenario is unreasonable.

[0051] raise ValueError("Full flash pool does not support the cache parameter") Accordingly, the type of the first storage pool is determined by the cluster status value, avoiding the setting of unreasonable test scenarios.

[0052] Based on the above embodiments, as an implementable approach, in one embodiment, a first test parameter set is determined according to the type and attribute information represented by the first storage pool and the corresponding cluster state value, including: Step 2031: If the type represented by the first storage pool is hybrid, determine the total capacity of the first storage medium based on the attribute information represented by the first storage pool. Step 2032: Determine the first parameter corresponding to the first storage medium based on the total capacity of the first storage medium, the corresponding cluster status value, the preset number of nodes, and the preset number of replicas; Step 2033: Determine the total capacity of the second storage medium based on the attribute information represented by the first storage pool; wherein, the first storage pool includes the first storage medium and the second storage medium; Step 2034: Determine the second parameter corresponding to the second storage medium based on the total capacity of the second storage medium, the corresponding cluster status value, the preset number of nodes, and the preset number of replicas; Step 2035: Determine the first test parameter set based on the first parameter and the second parameter.

[0053] Specifically, in one embodiment, the first parameter can be determined based on the following formula:

[0054] in, Indicates the first parameter. This indicates the total capacity of the first storage medium. Indicates the cluster status value. Indicates the preset number of nodes. Indicates the preset number of copies.

[0055] Specifically, in one embodiment, the second parameter can be determined based on the following formula:

[0056] in, Indicates the second parameter. Indicates the total capacity of the second storage medium. Indicates the cluster status value. Indicates the preset number of nodes. Indicates the preset number of copies.

[0057] Specifically, since the storage pool mixed flash refers to the storage pool being composed of HDDs and SDDs, the storage pool full flash refers to the storage pool being composed of only SDDs.

[0058] In the case of a hybrid storage pool, i.e., mixed flash storage, the first storage medium is HDD and the second storage medium is SSD. The attribute information of the first storage pool includes the capacity of HDD and SSD. The first parameter is determined based on the corresponding cluster status value, the preset number of nodes and the preset number of replicas.

[0059] For example, if the first storage pool is a mixed flash and the cluster status value is cache_normal, the corresponding usage ratio is determined to be 10% based on cache_normal. The preset number of nodes in the standard pool is 3, the preset number of replicas is 2, and the total capacity of HDD is 270TB, then the total capacity of the first storage medium is 270TB, the total capacity of SSD is 30TB, and the total capacity of the second storage medium is 30TB.

[0060]

[0061]

[0062] Specifically, in one embodiment, the value of the first test parameter can be determined based on the following formula:

[0063] in, This indicates the value of the first test parameter. Indicates the first parameter. This indicates the second parameter.

[0064] Specifically, the value of the first test parameter is determined using the following code: if "cache" in param2: pool_type = "Mixed Flash" #If the data volume of parameter 2 includes cache, it means that the storage pool type to be injected into the fault is a mixed flash cluster. Then, the initial size of the LUN is determined according to the ratio obtained from parameter 2, which is the first test parameter value. Since the standard pool is 3 nodes and 2 replicas, the initial size of the LUN needs to be / 3 / 2. max_total = other_pool['total'] ×0.9 / 3 / 2 # Use 1 / 6 of 90%; max_cache = other_pool['cache'] ×0.9 / 3 / 2 #Usage rate 90% 1 / 6 return min(max_total, max_cache) else: # For a full flash pool, only the total capacity needs to be considered. return other_pool['total'] ×0.9 / 3 / 2 #Usage rate 90% 1 / 6 Accordingly, by flexibly determining the corresponding test parameter constraints under the current test scenario based on the capacity and usage status of the first storage pool, the constraints of the first storage pool are automatically calculated under complex test scenarios, taking into account different factors. This avoids the problems of missing constraints or inaccurate test parameters caused by manual calculation.

[0065] Based on the above embodiments, as an implementable approach, in one embodiment, according to the type and attribute information represented by the first storage pool and the corresponding cluster state value, the following is included: Step 301: If the type of the first storage pool is non-hybrid, determine the total capacity of the first storage pool based on the attribute information of the first storage pool. Step 302: Determine the third parameter corresponding to the first storage pool based on the total capacity of the first storage pool, the corresponding cluster status value, the preset number of nodes, and the preset number of replicas; Step 303: Determine the first test parameter set based on the third parameter.

[0066] Specifically, the second storage pool is determined using the following code: def get_other_pool_max(storage_combination, primary_pool_type): #Determine the storage cluster type and the first storage pool type param storage_combination: str The storage combination type, such as "hybrid flash - all flash". param primary_pool_type: str The primary storage pool type, either "mixed flash" or "all flash". return: float Maximum allowed LUN size (in TB) for the second storage pool # Parse storage combination to obtain peer pool type pool_a, pool_b = storage_combination.split('-') other_pool_type = pool_b if primary_pool_type == pool_a else pool_a # Obtain the configuration of the second storage pool (in actual projects, this is obtained from the cluster management API). other_pool = get_pool_config(other_pool_type) # Returns {total: 100, cache: 10} (in TB) Specifically, in one embodiment, the third parameter can be determined based on the following formula:

[0067] in, Indicates the third parameter. This represents the total capacity of the first storage pool. Indicates the cluster status value. Indicates the preset number of nodes. Indicates the preset number of copies.

[0068] Specifically, when the first storage pool is all-flash, the attribute information of the first storage pool is the capacity of the SSD. Based on the corresponding cluster status value, the preset number of nodes and the preset number of replicas, the third parameter is determined.

[0069] For example, when the first storage pool is all flash, the cluster status value is the usage status value, and the corresponding usage ratio is determined to be 20% based on the usage status value. The preset number of nodes in the standard pool is 3, the preset number of replicas is 2, and the total capacity of the SSD is 300TB.

[0070]

[0071] Specifically, in one embodiment, the value of the second test parameter can be determined based on the following formula:

[0072] in, This indicates the value of the second test parameter. This indicates the third parameter.

[0073] Specifically, in one embodiment, the target test parameter value can be determined based on the following formula:

[0074] in, Indicates the target test parameter value. This indicates the value of the first test parameter. This indicates the value of the second test parameter.

[0075] Specifically, the first test parameter value represents the maximum security test parameter determined by the first storage pool based on its capacity, number of nodes, number of replicas, and usage status. The second test parameter value represents the maximum security test parameter determined by the second storage pool based on its capacity, number of nodes, number of replicas, and usage status. By taking the minimum value, the target test parameter value is made compatible with both the first and second storage pools.

[0076] Correspondingly, by taking the minimum value, the target test parameter value can be run in multiple storage pools, avoiding performance crashes or test failures caused by the target test parameter value being too large during the test process.

[0077] Specifically, in one embodiment, the maximum utilization rate of the storage pool is 90%. The utilization rate of 90% is used as the cluster status value to determine the corresponding test parameter threshold value. The target test parameter value must be less than the test parameter threshold value.

[0078] For example, such as Figure 4 The diagram shown is an exemplary structural schematic of test parameter determination provided in this application embodiment. In the control plane, the storage cluster type and cluster status value are obtained through the parameter parsing engine. Through the storage pool adapter, the first storage pool and the second storage pool are determined according to the cluster status value. Taking the storage cluster type as "hybrid flash-all flash" as an example, the corresponding first test parameter value and second test parameter value are determined in the capacity calculation model, and the target test parameter value is further determined. The target test parameter value is sent to the data plane as a configuration parameter. The data plane includes a hybrid flash storage pool and an all flash storage pool. During the fault test, the fault test is performed through an automated test framework, using the target test parameter value as the target configuration parameter of the logical unit of the fault test.

[0079] Specifically, in one embodiment, a corresponding test parameter mapping library is established based on the storage cluster type, cluster status value, and corresponding historical target test parameter values. After obtaining the storage cluster type and cluster status value, a query is first performed in the test parameter mapping library based on the storage cluster type and cluster status value. If a match is found, the corresponding target test parameter value is directly used as the target configuration parameter of the logical unit for fault testing, and fault testing is performed. If a match is not found, the target test parameter value is determined according to the test parameter determination method provided in this application. By querying first and then calculating, the need to recalculate for the same storage cluster type and cluster status value is avoided, saving computing resources and improving testing efficiency.

[0080] The test parameter determination method provided in this application includes: obtaining a storage cluster type and a cluster status value; determining a first storage pool based on the storage cluster type and cluster status value; determining a first test parameter set based on the type and attribute information represented by the first storage pool and the corresponding cluster status value; determining a first test parameter value based on the first test parameter set; determining a second storage pool based on the storage cluster type and the first storage pool type; wherein the storage cluster includes the first storage pool and the second storage pool; determining a second test parameter set based on the type and attribute information represented by the second storage pool and the corresponding cluster status value; determining a second test parameter value based on the second test parameter set; and determining a target test parameter value based on the first test parameter value and the second test parameter value; wherein the target test parameter value includes at least the target configuration parameters of the logical units when testing the storage cluster. The method provided by the above solution first obtains the storage cluster type and cluster status value to determine the first storage pool, and then determines the first test parameter set based on its type, attribute information, and cluster status value, thereby determining the first test parameter value. Next, based on the storage cluster type and the first storage pool type, the second storage pool is determined, and based on its type, attribute information, and corresponding cluster status value, the second test pool parameter set is determined, thereby determining the second test parameter value. Finally, based on the first and second test parameter values, the target test parameter value is determined. By using different storage cluster types and cluster status values, various complex test scenarios are covered. Furthermore, by determining the first and second test parameter values ​​that meet the constraints, the target test parameter value that meets the actual test requirements is determined, thus improving the accuracy and realism of the test.

[0081] Furthermore, by employing four combinations—"mixed flash-all flash," "mixed flash-mixed flash," "all flash-all flash," and "all flash-mixed flash"—the test covers various storage types within the storage pool under a dual-active data center architecture. The cluster status values ​​cover multiple usage states of the storage pool. By combining different cluster status values ​​under different storage cluster types, the test scenarios are expanded, more closely resembling the actual usage states of the storage pool, thus improving the realism of the simulation tests. Simultaneously, compared to manually determining test scenarios, the time is reduced from 4-6 hours to 3 minutes, improving the efficiency of test scenario generation. Based on the type, attribute information, and cluster status values ​​of the first storage pool, the constraints of the target test parameter values ​​are quantified, avoiding reliance on manual estimation and improving the accuracy of test parameter determination. Based on the type, attribute information, and cluster status values ​​of the second storage pool, the constraints of the target test parameter values ​​are quantified, avoiding reliance on manual estimation and improving the accuracy of test parameter determination. Because the multiple storage pools in a dual-active data center have different types and usage states, but require unified and compatible test parameters, this system determines the corresponding constraints based on the type of each storage pool and the cluster usage state. By combining multiple constraints, the target test parameter value is determined. This enables the automatic calculation of reasonable test parameters in complex test scenarios, avoiding the problems of unreasonable test parameters and invalid test cases caused by manual parameter determination due to complex test scenarios. Simultaneously, reasonable target test parameter values ​​automatically maintain load balance across storage pools in a dual-active architecture, preventing test distortion caused by single-pool overload. The type of the first storage pool is determined by the cluster status value, avoiding the setting of unreasonable test scenarios. By flexibly determining the corresponding test parameter constraints for the current test scenario based on the capacity and usage state of the first storage pool, the system automatically calculates the constraints for the first storage pool in complex test scenarios, considering various factors, avoiding the omission of constraints or inaccurate test parameters caused by manual calculation. By taking the minimum value, the target test parameter value can be applied across multiple storage pools, avoiding performance crashes or test failures caused by excessively large target test parameter values.

[0082] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0083] An embodiment of this application also provides a test parameter determination apparatus for executing the test parameter determination method provided in the above embodiments.

[0084] like Figure 5The diagram shown is a schematic representation of the test parameter determination device provided in an embodiment of this application. The test parameter determination device 50 includes: an acquisition module 501, a first storage pool determination module 502, a first parameter set determination module 503, a first parameter determination module 504, a second storage pool determination module 505, a second parameter set determination module 506, a second parameter determination module 507, and a target parameter determination module 508.

[0085] The system includes the following modules: an acquisition module for acquiring the storage cluster type and cluster status value; a first storage pool determination module for determining the first storage pool based on the storage cluster type and cluster status value; a first parameter set determination module for determining the first test parameter set based on the type and attribute information represented by the first storage pool and the corresponding cluster status value; a first parameter determination module for determining the first test parameter value based on the first test parameter set; a second storage pool determination module for determining the second storage pool based on the storage cluster type and the first storage pool type; wherein the storage cluster includes the first storage pool and the second storage pool; a second parameter set determination module for determining the second test parameter set based on the type and attribute information represented by the second storage pool and the cluster status value; a second parameter determination module for determining the second test parameter value based on the second test parameter set; and a target parameter determination module for determining the target test parameter value based on the first test parameter value and the second test parameter value; wherein the target test parameter value includes at least the target configuration parameters of the logical units when testing the storage cluster.

[0086] For a description of the features in the embodiment corresponding to the test parameter determination device, please refer to the relevant description in the embodiment corresponding to the test parameter determination method, which will not be repeated here.

[0087] Embodiments of this application also provide an electronic device, such as... Figure 6 The diagram shown is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, including a processor 10 and a memory 20. The memory 20 stores a computer program, and the processor 10 is configured to run the computer program to execute the steps in any of the above-described test parameter determination method embodiments.

[0088] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described test parameter determination method embodiments when running.

[0089] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0090] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described test parameter determination method embodiments.

[0091] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described test parameter determination method embodiments.

[0092] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.

[0093] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0094] The foregoing has provided a detailed description of a method, apparatus, electronic device, and storage medium for determining test parameters provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to aid in understanding the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method for determining test parameters, characterized in that, The method includes: Retrieve the storage cluster type and cluster status values; The first storage pool is determined based on the storage cluster type and cluster status value; Based on the type and attribute information represented by the first storage pool, and the corresponding cluster status value, determine the first test parameter set; The first test parameter value is determined based on the first test parameter set; A second storage pool is determined based on the storage cluster type and the first storage pool type; wherein the storage cluster includes the first storage pool and the second storage pool; The second set of test parameters is determined based on the type and attribute information represented by the second storage pool and the corresponding cluster status value. Determine the value of the second test parameter based on the second test parameter set; The target test parameter value is determined based on the first test parameter value and the second test parameter value; The target test parameter values ​​include at least the target configuration parameters of the logical units when testing the storage cluster.

2. The method for determining test parameters according to claim 1, characterized in that, The step of determining the first storage pool based on the storage cluster type and cluster status value includes: If the cluster status value is a cache status value and the storage cluster type includes a hybrid type, then the first storage pool type is determined to be hybrid. If the cluster status value is the usage status value and the storage cluster type includes non-hybrid type, then the first storage pool type is determined to be non-hybrid.

3. The method for determining test parameters according to claim 1, characterized in that, The step of determining the first test parameter set based on the type and attribute information represented by the first storage pool and the corresponding cluster status value includes: When the type represented by the first storage pool is hybrid, the total capacity of the first storage medium is determined based on the attribute information represented by the first storage pool. The first parameter corresponding to the first storage medium is determined based on the total capacity of the first storage medium, the corresponding cluster status value, the preset number of nodes, and the preset number of replicas. The total capacity of the second storage medium is determined based on the attribute information represented by the first storage pool; wherein, the first storage pool includes a first storage medium and a second storage medium; The second parameter corresponding to the second storage medium is determined based on the total capacity of the second storage medium, the corresponding cluster status value, the preset number of nodes, and the preset number of replicas. The first test parameter set is determined based on the first parameter and the second parameter.

4. The method for determining test parameters according to claim 3, characterized in that, The step of determining the first parameter corresponding to the first storage medium based on the total capacity of the first storage medium, the corresponding cluster status value, the preset number of nodes, and the preset number of replicas includes: The first parameter is determined based on the following formula: in, Indicates the first parameter. This indicates the total capacity of the first storage medium. Indicates the cluster status value. Indicates the preset number of nodes. Indicates the preset number of copies.

5. The method for determining test parameters according to claim 1, characterized in that, The step of determining the target test parameter value based on the first test parameter value and the second test parameter value includes: The target test parameter value is determined based on the following formula: in, Indicates the target test parameter value. This indicates the value of the first test parameter. This indicates the value of the second test parameter.

6. The method for determining test parameters according to claim 1, characterized in that, The step of determining the first test parameter set based on the type and attribute information represented by the first storage pool and the corresponding cluster status value includes: When the type represented by the first storage pool is non-hybrid, the total capacity of the first storage pool is determined based on the attribute information represented by the first storage pool. The third parameter corresponding to the first storage pool is determined based on the total capacity of the first storage pool, the corresponding cluster status value, the preset number of nodes, and the preset number of replicas. The first test parameter set is determined based on the third parameter.

7. The method for determining test parameters according to claim 6, characterized in that, The step of determining the third parameter corresponding to the first storage pool based on the total capacity of the first storage pool, the corresponding cluster status value, the preset number of nodes, and the preset number of replicas includes: The third parameter is determined based on the following formula: in, Indicates the third parameter. This represents the total capacity of the first storage pool. Indicates the cluster status value. Indicates the preset number of nodes. Indicates the preset number of copies.

8. A device for determining test parameters, characterized in that, The device includes: The acquisition module is used to obtain the storage cluster type and cluster status value; The first storage pool determination module is used to determine the first storage pool based on the storage cluster type and cluster status value. The first parameter set determination module is used to determine the first test parameter set based on the type and attribute information represented by the first storage pool and the corresponding cluster status value. The first parameter determination module is used to determine the value of the first test parameter based on the first test parameter set; The second storage pool determination module is used to determine a second storage pool based on the storage cluster type and the first storage pool type; wherein the storage cluster includes the first storage pool and the second storage pool. The second parameter set determination module is used to determine the second test parameter set based on the type and attribute information represented by the second storage pool and the corresponding cluster status value. The second parameter determination module is used to determine the value of the second test parameter based on the second test parameter set; The target parameter determination module is used to determine the target test parameter value based on the first test parameter value and the second test parameter value; The target test parameter values ​​include at least the target configuration parameters of the logical units when testing the storage cluster.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the test parameter determination method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the test parameter determination method as described in any one of claims 1 to 7.