CN114924919A - Node management test method, system and storage medium - Google Patents

Node management test method, system and storage medium Download PDF

Info

Publication number
CN114924919A
CN114924919A CN202210399352.3A CN202210399352A CN114924919A CN 114924919 A CN114924919 A CN 114924919A CN 202210399352 A CN202210399352 A CN 202210399352A CN 114924919 A CN114924919 A CN 114924919A
Authority
CN
China
Prior art keywords
node
list
cluster
test
test execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210399352.3A
Other languages
Chinese (zh)
Other versions
CN114924919B (en
Inventor
张鹏鹏
徐文豪
王弘毅
张凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SmartX Inc
Original Assignee
SmartX Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SmartX Inc filed Critical SmartX Inc
Priority to CN202210399352.3A priority Critical patent/CN114924919B/en
Publication of CN114924919A publication Critical patent/CN114924919A/en
Application granted granted Critical
Publication of CN114924919B publication Critical patent/CN114924919B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The embodiment of the invention discloses a node management test method, a node management test system and a storage medium, wherein the method comprises the following steps: initializing a host list, a master role node list, a storage role node list and a removable node list according to attribute information of each node acquired from cluster information; meanwhile, chaotic node management test operations in various forms including node removal, host node addition and role switching management can be performed, so that the node test efficiency is greatly improved, and the operation time is saved.

Description

Node management test method, system and storage medium
Technical Field
The invention relates to the technical field of super-fusion storage, in particular to a node management test method, a node management test system and a storage medium.
Background
Research and development find that based on the characteristics of a super-fusion architecture, a super-fusion cluster often comprises a plurality of nodes with different functional roles; for example, taking a SmartX super fusion product as an example, a common cluster at least includes 3 nodes, node roles of master and storage may exist simultaneously under a multi-node cluster, the product needs to provide a node management function for a user, and service scenarios such as adding nodes, removing nodes, and switching between node roles exist in daily application.
The test requirements under the conditions of a single scene, a combined scene, different platform clusters and different functional characteristic clusters are derived from the scenes, and the requirements can hardly be met by the conventional test method mainly through manual test. Because the hyper-convergence product relates to a hardware platform and has more functional characteristics, the node management function needs to be compatible with the use of different clusters, each service scene contained in the node management generally consumes longer time, and various operations are associated with each other. The manual testing operation mode needs great labor and time cost; the existing automation is more to test the function point under a single scene, the chaos test under a combination scene is lacked, and the high-efficiency and reliable quality guarantee can not be achieved in the iteration process of the product version.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a node management test method, system and storage medium to solve the problems indicated in the background art.
An embodiment of the present invention provides a node management test method, including:
step S100, acquiring a cluster to be tested;
step S200, acquiring cluster information of a cluster to be tested, acquiring attribute information of each node according to the cluster information, and initializing a host list, a master role node list, a storage role node list and a removable node list;
step S300, acquiring the current action test execution operation, and initializing an action test execution operation list (namely, an action operation list) and an action test execution frequency record (standard limit frequency); the action test execution operation comprises node adding, node removing, node role switching from a master node to a storage node and node role switching from the storage node to the master node;
s400, acquiring the execution times I of the current action test;
step S500, judging the acquired current action test execution times I; judging whether the current action test execution times I is less than the standard limit times, if so, randomly generating target action test execution operation from (an action test execution operation list) according to a host list, a master role node list, a storage role node list and removable node list data; if the judgment result is negative, skipping to execute the step S700 (directly outputting the test result);
step S600, executing a target action test execution operation, judging an operation result of the target action test execution operation after the target action test execution operation is finished, if the target action test execution operation is successful, updating a host list, a master role node list, a storage role node list and a removable node list, and returning to the step S400 for circular operation; if the target action test execution operation fails, terminating the current target action test execution operation, and executing the step S700;
step S700: and directly outputting the test result of the current target action test execution.
Preferably, as one possible embodiment; the acquiring the cluster to be tested specifically comprises: by creating a test cluster or calling an existing test cluster as the cluster to be tested.
Preferably, as one possible embodiment; the method comprises the steps of acquiring cluster information of a cluster to be tested, initializing the cluster information, and initializing first node initialization information, second node initialization information, third node initialization information and fourth node initialization information.
Preferably, as one possible embodiment; the first node initialization information is host address information.
Preferably, as one possible embodiment; and the second node initialization information is disk information.
Preferably, as one possible embodiment; the third node initialization information is network card information.
Preferably, as one possible embodiment; and the fourth node initialization information is role attribute information.
The invention provides a node management test system, comprising: the device comprises a test cluster acquisition unit, a test cluster initial unit, a test initialization unit, a test frequency acquisition unit, a first judgment processing unit, an operation result processing unit and a result output unit;
the device comprises a test cluster acquisition unit, a test cluster acquisition unit and a test cluster analysis unit, wherein the test cluster acquisition unit is used for acquiring a cluster to be tested;
the test cluster initialization unit is used for acquiring cluster information of a cluster to be tested, acquiring attribute information of each node according to the cluster information, and initializing a host list, a master role node list, a storage role node list and a removable node list;
a test initialization unit for acquiring the current action test execution operation and initializing an action test execution operation list (i.e. action operation list) and an action test execution number record (standard limit number); the action test execution operation comprises node adding, node removing, node role switching from a master node to a storage node and node role switching from the storage node to the master node;
a test frequency acquisition unit for acquiring the current action test execution frequency I;
the first judgment processing unit is used for judging the acquired current action test execution times I; judging whether the current action test execution frequency I is smaller than the standard limit frequency, if so, randomly generating target action test execution operation from (an action test execution operation list) according to the host list, the master role node list, the storage role node list and the removable node list data; if the judgment result is negative, the execution result output unit is skipped to directly output the test result;
the operation result processing unit is used for executing the target action test execution operation, judging the operation result of the target action test execution operation after the target action test execution operation is finished, and if the target action test execution operation is successful, updating the host list, the master role node list, the storage role node list and the removable node list, and returning to the test frequency acquisition unit for circular operation; if the target action test execution operation fails, terminating the current target action test execution operation, and executing corresponding operation through a result output unit;
and the result output unit is used for directly outputting the test result executed by the current target action test.
The present invention provides a computer-readable storage medium comprising: which stores a computer program that, when executed, implements the node management test method according to the above.
Compared with the prior art, the invention has the following technical effects:
the method provided by the embodiment of the invention obtains the cluster information of the cluster to be tested, then initializes a host list, a master role node list, a storage role node list and a removable node list according to the attribute information of each node obtained in the cluster information; meanwhile, chaotic node management test operations in various forms including node removal, host node addition and role switching management can be carried out; meanwhile, within the limited times, the automatic test is carried out on the random combination of the super-fusion cluster node management related operations, the manual test is liberated, the human input in the test process is reduced, and the test efficiency and the test stability are finally improved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings required to be used in the embodiments will be briefly described below, and it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention. Like components are numbered similarly in the various figures.
Fig. 1 illustrates a main flowchart of a node management testing method according to an embodiment of the present invention;
fig. 2 shows a schematic structural diagram of a node management test system according to a second embodiment of the present invention.
Description of the main element symbols: the test system comprises a test cluster acquisition unit 10, a test cluster initialization unit 20, a test initialization unit 30, a test frequency acquisition unit 40, a first judgment processing unit 50, an operation result processing unit 60 and a result output unit 70.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making creative efforts shall fall within the protection scope of the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
Example one
Referring to fig. 1, a node management test method according to an embodiment of the present invention includes:
step S100, acquiring a cluster to be tested;
step S200, acquiring cluster information of a cluster to be tested (wherein the cluster information comprises each node in the cluster and attribute information of the node), and initializing a host list, a master role node list, a storage role node list and a removable node list according to the attribute information of each node acquired in the cluster information; the corresponding initialization according to the attribute information of the nodes means that the current nodes have various types and many nodes with different attributes, so that the whole initialization operation is required to be carried out every time the test operation of the cluster to be tested is carried out; if part of the nodes are host nodes and correspond to the initialized host list, and if part of the nodes are master role nodes, the master role node list is initialized correspondingly; part of storage role nodes correspondingly initialize a storage role node list; synchronizing a technical operation of initializing the removable node list;
step S300, acquiring the current action test execution operation, and initializing an action test execution operation list (namely an action operation list) and an action test execution frequency record (standard limit frequency); the action test execution operation comprises node adding, node removing, node role switching from a master node to a storage node and node role switching from the storage node to the master node;
s400, acquiring the execution times I of the current action test;
step S500, judging the acquired current action test execution times I; judging whether the current action test execution frequency I is less than the standard limit frequency, if so, randomly generating a target action test execution operation from an action test execution operation list according to the data of a host list, a master role node list, a storage role node list and a removable node list (it needs to be noted that the randomly generated action is a test method for simulating a chaotic test, the random mode can freely combine operation sequences among the actions, and the test effect is more consistent with the actual use scene of a user);
step S600, executing the target action test execution operation, judging the operation result of the target action test execution operation after the target action test execution operation is finished, if the target action test execution operation is successful, updating a host list, a master role node list, a storage role node list and a removable node list, and returning to the step S400 for circular operation; if the target action test execution operation fails, terminating the current target action test execution operation, and executing the step S700;
step S700: and directly outputting the test result of the current target action test execution.
In the technical scheme of the application, a host list, namely idle _ node _ poll, can be used for adding the host list, can prepare host node information in advance, and can store nodes removed from a cluster in the test process into the list for subsequent addition; master role node list is master _ node _ pool; a storage role node list is storage _ node _ pool; a removable node list, deletable _ node _ pool;
preferably, as one possible embodiment; the acquiring of the cluster to be tested specifically includes: by creating a test cluster or calling an existing test cluster as the cluster to be tested.
Preferably, as one possible embodiment; the method comprises the steps of acquiring cluster information of a cluster to be tested, initializing the cluster information, and initializing first node initialization information, second node initialization information, third node initialization information and fourth node initialization information.
Preferably, as one possible embodiment; the first node initialization information is host address information.
Preferably, as one possible embodiment; and the second node initialization information is disk information.
Preferably, as one possible embodiment; the third node initialization information is network card information.
Preferably, as one possible embodiment; and the fourth node initialization information is role attribute information.
It should be noted that initializing host address information, disk information, network card information and role attribute information has the following purposes; because the host address information is used during each action execution, which host to operate is determined according to the address; the role attribute information is mainly used for updating a master node list and a storage node list; the disk information and the network card information are used in the action of adding the host, and are not described in detail.
Example two
Referring to fig. 2, a second embodiment of the present invention provides a node management test system, including: a test cluster obtaining unit 10, a test cluster initializing unit 20, a test initializing unit 30, a test number obtaining unit 40, a first judgment processing unit 50, an operation result processing unit 60, and a result output unit 70;
the test cluster acquiring unit 10 is configured to acquire a cluster to be tested;
the test cluster initialization unit 20 is configured to acquire cluster information of a cluster to be tested, acquire attribute information of each node according to the cluster information, and initialize a host list, a master role node list, a storage role node list, and a removable node list;
a test initialization unit 30, which acquires the current action test execution operation and is used to initialize the action test execution operation list (i.e. the action operation list) and the action test execution times record (standard limit times); the action test execution operation comprises node adding, node removing, node role switching from a master node to a storage node and node role switching from the storage node to the master node;
a test frequency obtaining unit 40, configured to obtain a current action test execution frequency I;
a first judgment processing unit 50 for performing judgment processing on the acquired current action test execution times I; judging whether the current action test execution times I is less than the standard limit times, if so, randomly generating target action test execution operation from (an action test execution operation list) according to a host list, a master role node list, a storage role node list and removable node list data; if the judgment result is negative, the skip execution result output unit directly outputs the test result;
an operation result processing unit 60, configured to execute the target action test execution operation, determine an operation result of the target action test execution operation after the target action test execution operation is completed, update the host list, the master role node list, the storage role node list, and the removable node list if the target action test execution operation is successful, and return to the test number acquisition unit for cycle operation; if the target action test execution operation fails, terminating the current target action test execution operation, and executing corresponding operation through a result output unit;
a result output unit 70 for directly outputting the test result of the current target action test execution.
The present invention provides a computer-readable storage medium comprising: which stores a computer program that, when executed, implements the node management test method according to the above.
The node management testing method adopted by the embodiment of the application can achieve the automatic testing effect of random combination of related operations of super-fusion cluster node management, is compatible with clusters of different platforms, different versions and different functional characteristics, liberates manual testing, reduces manpower input in the testing process, and improves testing efficiency and testing stability.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention.

Claims (9)

1. A node management test method is characterized by comprising the following steps:
step S100, acquiring a cluster to be tested;
step S200, acquiring cluster information of a cluster to be tested, acquiring attribute information of each node according to the cluster information, and initializing a host list, a master role node list, a storage role node list and a removable node list;
step S300, acquiring the current action test execution operation, and initializing an action test execution operation list and an action test execution frequency record; the action test execution operation comprises node adding, node removing, node role switching from a master node to a storage node and node role switching from the storage node to the master node;
step S400, acquiring the execution times I of the current action test;
step S500, judging the acquired current action test execution times I; judging whether the current action test execution frequency I is smaller than the standard limit frequency, if so, randomly generating target action test execution operation from the action test execution operation list according to the host list, the master role node list, the storage role node list and the removable node list data; if the judgment result is negative, skipping to execute the step S700;
step S600, executing a target action test execution operation, judging an operation result of the target action test execution operation after the target action test execution operation is finished, if the target action test execution operation is successful, updating a host list, a master role node list, a storage role node list and a removable node list, and returning to the step S400 for circular operation; if the target action test execution operation fails, terminating the current target action test execution operation, and executing the step S700;
step S700: and directly outputting the test result of the current target action test execution.
2. The node management test method according to claim 1, wherein the obtaining a cluster to be tested specifically includes: by creating a test cluster or calling an existing test cluster as the cluster to be tested.
3. The method of claim 2, wherein initializing cluster information of a cluster to be tested while acquiring the cluster information, further comprises initializing first node initialization information, second node initialization information, third node initialization information, and fourth node initialization information.
4. The method as claimed in claim 3, wherein the first node initialization information is host address information.
5. The node management test method according to claim 3, wherein the second node initialization information is disk information.
6. The method according to claim 3, wherein the initialization information of the third node is network card information.
7. The method according to claim 3, wherein the fourth node initialization information is role attribute information.
8. A node management test system, comprising: the device comprises a test cluster acquisition unit, a test cluster initial unit, a test initialization unit, a test frequency acquisition unit, a first judgment processing unit, an operation result processing unit and a result output unit;
the device comprises a test cluster acquisition unit, a test cluster acquisition unit and a test cluster analysis unit, wherein the test cluster acquisition unit is used for acquiring a cluster to be tested;
the test cluster initialization unit is used for acquiring cluster information of a cluster to be tested, acquiring attribute information of each node according to the cluster information, and initializing a host list, a master role node list, a storage role node list and a removable node list;
the test initialization unit is used for acquiring the current action test execution operation and initializing an action test execution operation list and an action test execution frequency record; the action test execution operation comprises node adding, node removing, node role conversion from a master node to a storage node and node role conversion from the storage node to the master node;
a test frequency acquisition unit for acquiring the current action test execution frequency I;
the first judgment processing unit is used for judging the acquired current action test execution times I; judging whether the current action test execution times I is smaller than the standard limit times, if so, randomly generating target action test execution operation from the action test execution operation list according to the host list, the master role node list, the storage role node list and the removable node list data; if the judgment result is negative, the execution result output unit is skipped to directly output the test result;
the operation result processing unit is used for executing the target action test execution operation, judging the operation result of the target action test execution operation after the target action test execution operation is finished, and if the target action test execution operation is successful, updating the host list, the master role node list, the storage role node list and the removable node list, and returning to the test frequency acquisition unit for cyclic operation; if the target action test execution operation fails, terminating the current target action test execution operation, and executing corresponding operation through a result output unit;
and the result output unit is used for directly outputting the test result executed by the current target action test.
9. A computer-readable storage medium, comprising: which stores a computer program which, when executed, implements a node management test method according to any one of claims 1-7.
CN202210399352.3A 2022-04-15 2022-04-15 Node management test method, system and storage medium Active CN114924919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210399352.3A CN114924919B (en) 2022-04-15 2022-04-15 Node management test method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210399352.3A CN114924919B (en) 2022-04-15 2022-04-15 Node management test method, system and storage medium

Publications (2)

Publication Number Publication Date
CN114924919A true CN114924919A (en) 2022-08-19
CN114924919B CN114924919B (en) 2023-01-24

Family

ID=82806283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210399352.3A Active CN114924919B (en) 2022-04-15 2022-04-15 Node management test method, system and storage medium

Country Status (1)

Country Link
CN (1) CN114924919B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7434104B1 (en) * 2005-03-31 2008-10-07 Unisys Corporation Method and system for efficiently testing core functionality of clustered configurations
CN102711157A (en) * 2012-06-11 2012-10-03 哈尔滨海能达科技有限公司 Method, device and system for testing air interface pressure of trunking system
CN105024855A (en) * 2015-07-13 2015-11-04 浪潮(北京)电子信息产业有限公司 Distributed cluster management system and method
CN110389900A (en) * 2019-07-10 2019-10-29 深圳市腾讯计算机系统有限公司 A kind of distributed experiment & measurement system test method, device and storage medium
CN111338871A (en) * 2020-02-27 2020-06-26 苏州浪潮智能科技有限公司 Distributed file system Qzone high availability test method, system, equipment and storage medium
CN111400117A (en) * 2020-03-12 2020-07-10 山东汇贸电子口岸有限公司 Method for automatically testing Ceph cluster
CN111881018A (en) * 2020-06-29 2020-11-03 苏州浪潮智能科技有限公司 Automatic test dynamic scheduling system
CN113590403A (en) * 2021-08-05 2021-11-02 北京百度网讯科技有限公司 Pressure testing method, device, system, electronic equipment, storage medium and product

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7434104B1 (en) * 2005-03-31 2008-10-07 Unisys Corporation Method and system for efficiently testing core functionality of clustered configurations
CN102711157A (en) * 2012-06-11 2012-10-03 哈尔滨海能达科技有限公司 Method, device and system for testing air interface pressure of trunking system
CN105024855A (en) * 2015-07-13 2015-11-04 浪潮(北京)电子信息产业有限公司 Distributed cluster management system and method
CN110389900A (en) * 2019-07-10 2019-10-29 深圳市腾讯计算机系统有限公司 A kind of distributed experiment & measurement system test method, device and storage medium
CN111338871A (en) * 2020-02-27 2020-06-26 苏州浪潮智能科技有限公司 Distributed file system Qzone high availability test method, system, equipment and storage medium
CN111400117A (en) * 2020-03-12 2020-07-10 山东汇贸电子口岸有限公司 Method for automatically testing Ceph cluster
CN111881018A (en) * 2020-06-29 2020-11-03 苏州浪潮智能科技有限公司 Automatic test dynamic scheduling system
CN113590403A (en) * 2021-08-05 2021-11-02 北京百度网讯科技有限公司 Pressure testing method, device, system, electronic equipment, storage medium and product

Also Published As

Publication number Publication date
CN114924919B (en) 2023-01-24

Similar Documents

Publication Publication Date Title
CN109951547B (en) Transaction request parallel processing method, device, equipment and medium
CN104461693B (en) Virtual machine update method and system under a kind of desktop cloud computing environment
CN110018996B (en) Snapshot rollback method and related device of distributed storage system
CN110875850B (en) Firmware upgrading method and system, readable storage medium and terminal equipment
CN113760476B (en) Task dependency processing method and related device
CN109460358B (en) Configuration management method and system based on Cmdb
CN111158800B (en) Method and device for constructing task DAG based on mapping relation
CN111143039A (en) Virtual machine scheduling method and device and computer storage medium
CN114003451B (en) Interface testing method, device, system and medium
CN112044061B (en) Game picture processing method and device, electronic equipment and storage medium
CN116796552B (en) Simulation thinking asynchronous cooperative processing method and device
CN114924919B (en) Node management test method, system and storage medium
CN107609197B (en) A kind of method of data synchronization, data synchronization unit and mobile terminal
CN113792008A (en) Method and device for acquiring network topology structure, electronic equipment and storage medium
CN106445784B (en) Information monitoring method and device
CN116846799A (en) Game server stress test method and device, electronic equipment and storage medium
CN105653123B (en) A kind of icon group technology and terminal device
CN111701223B (en) Automatic flow control method and device for live-action entertainment
CN105188154B (en) A kind of method, apparatus and system being automatically brought into operation smart machine
CN113268324A (en) Task scheduling method and device, storage medium and computer equipment
CN112766486A (en) Searching method of neural network structure, terminal, server and readable storage medium
CN106469086B (en) Event processing method and device
CN110321276A (en) The generation method and device of test case
CN113760538B (en) Acceleration card type management and control method, system and device based on AI platform
CN115982394A (en) Entity behavior processing method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant