CN117240711B - Automatic updating method, device and equipment for cluster management tool configuration file - Google Patents

Automatic updating method, device and equipment for cluster management tool configuration file Download PDF

Info

Publication number
CN117240711B
CN117240711B CN202311193419.9A CN202311193419A CN117240711B CN 117240711 B CN117240711 B CN 117240711B CN 202311193419 A CN202311193419 A CN 202311193419A CN 117240711 B CN117240711 B CN 117240711B
Authority
CN
China
Prior art keywords
configuration file
management tool
distributed computing
time stamp
cluster
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.)
Active
Application number
CN202311193419.9A
Other languages
Chinese (zh)
Other versions
CN117240711A (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.)
Hexin Technology Suzhou Co ltd
Hexin Technology Co ltd
Original Assignee
Hexin Technology Suzhou Co ltd
Hexin Technology Co ltd
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 Hexin Technology Suzhou Co ltd, Hexin Technology Co ltd filed Critical Hexin Technology Suzhou Co ltd
Priority to CN202311193419.9A priority Critical patent/CN117240711B/en
Publication of CN117240711A publication Critical patent/CN117240711A/en
Application granted granted Critical
Publication of CN117240711B publication Critical patent/CN117240711B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the field of cluster management and discloses a method, a device and equipment for automatically updating a cluster management tool configuration file, wherein the method comprises the following steps: respectively acquiring a first editing time stamp of a target configuration file corresponding to the initial running of the automatic updating script and a second editing time stamp of the target configuration file corresponding to the current running of the automatic updating script; if the first editing time stamp is inconsistent with the second editing time stamp, acquiring a distributed computing cluster configuration file; performing text processing on the configuration file to obtain corresponding text content; the invention automatically updates the text content to the configuration file of the cluster management tool by confirming whether the configuration file of the distributed computing cluster is changed or not, and when the first editing time stamp is inconsistent with the second time stamp, the configuration file of the distributed computing cluster is obtained, and the configuration file of the cluster management tool is automatically updated according to the text content corresponding to the configuration file, so that the manual update of the configuration file is omitted.

Description

Automatic updating method, device and equipment for cluster management tool configuration file
Technical Field
The present invention relates to the field of cluster management, and in particular, to a method, an apparatus, and a device for automatically updating a configuration file of a cluster management tool.
Background
At present, the number of high-performance computing servers is continuously increasing, and in order to improve the working efficiency, batch management is often required for the servers. Along with the continuous progress of research and development work, the computing cluster integrally presents the characteristics of hardware diversification, queue complexity, user demand customization and the like of the server, and single batch management cannot meet the daily work demands.
In the prior art, batch updates to cluster management tool configuration files are often made by human personnel. However, the queue server is often changed, so that the configuration file of the cluster management tool is also changed continuously, and the complexity of manual operation is increased.
Disclosure of Invention
In view of the above, the present invention provides a method, apparatus and device for automatically updating a configuration file of a cluster management tool, so as to solve the problem that the configuration file of the cluster management tool cannot be automatically updated.
In a first aspect, the present invention provides a method for automatically updating a configuration file of a cluster management tool, where the method includes:
Respectively acquiring a first editing time stamp of a target configuration file corresponding to the initial running of the automatic updating script and a second editing time stamp of the target configuration file corresponding to the current running of the automatic updating script;
if the first editing time stamp is inconsistent with the second editing time stamp, acquiring a distributed computing cluster configuration file;
text processing is carried out on the distributed computing cluster configuration file based on the text processing command, and text content corresponding to the distributed computing cluster configuration file is obtained;
Automatically updating text content corresponding to the distributed computing cluster configuration file to the cluster management tool configuration file according to a preset cluster management tool configuration file rule.
The invention confirms whether the distributed computing cluster configuration file is changed or not by comparing the first editing time stamp with the second editing time stamp, and obtains the distributed computing cluster configuration file when the first editing time stamp is inconsistent with the second time stamp, thereby automatically updating the cluster management tool configuration file according to the text content corresponding to the configuration file, omitting the step of manually repeating the manual updating of the configuration file and improving the efficiency and accuracy of updating the cluster management tool configuration file.
In an alternative embodiment, the method further comprises:
and if the first editing time stamp is consistent with the second editing time stamp, determining that the distributed computing cluster configuration file is unchanged.
According to the method and the device, the change result of the configuration file when the script is automatically updated is confirmed through the comparison result of the first editing time stamp and the second editing time stamp, and the change condition of the configuration file is confirmed in time.
In an alternative embodiment, the obtaining the distributed computing cluster configuration file includes:
And acquiring the queue information and the host information corresponding to each queue of the distributed computing cluster by utilizing an automation script, and determining the queue information and the host information corresponding to each queue as a configuration file of the distributed computing cluster.
The invention utilizes the automatic script to acquire the configuration file corresponding to the cluster management tool, so as to save the step of manually calling the current configuration file, and improve the acquisition efficiency of the configuration file.
In an alternative embodiment, after obtaining the distributed computing cluster configuration file, the method further comprises:
updating the second editing time stamp to be a new first editing time stamp.
The second editing time stamp is used as a new first editing time stamp, so that the change condition of the configuration file is judged again, and the change condition of the configuration file is confirmed in time.
In an alternative embodiment, after automatically updating the text content corresponding to the distributed computing cluster configuration file to the cluster management tool configuration file according to a preset cluster management configuration file rule, the method further includes:
And verifying the updated state of the updated cluster management tool configuration file.
The invention verifies the updated state of the updated cluster management tool configuration file to increase the accuracy of the updated state, and reduce the possibility that the configuration file is not successfully updated and not found in time.
In an alternative embodiment, the verifying the updated update status of the updated cluster management tool configuration file includes:
acquiring an updated cluster configuration file, wherein the updated cluster configuration file comprises all the queue information and host information corresponding to all the queues under the updated cluster configuration;
and if the distributed computing cluster configuration file is consistent with the updated cluster configuration file, determining that the cluster management tool configuration file is updated successfully.
The invention compares the updated configuration file with the distributed computing cluster configuration file to confirm the updating condition of the cluster management tool configuration file according to the comparison result and confirm the updating condition of the configuration file in time, thereby being convenient for a manager to carry out the next processing according to the updating condition of the configuration file.
In an alternative embodiment, the method further comprises:
if the distributed computing cluster configuration file is inconsistent with the updated cluster management tool configuration file, determining that the cluster management tool configuration file fails to update, and generating update abnormality alarm information.
The invention confirms the updating condition of the configuration file of the cluster management tool according to the comparison result, confirms the updating condition of the configuration file in time, and generates the updating abnormal alarm information when the updating of the configuration file of the cluster management tool fails, thereby reminding a manager to process the abnormal condition in time so as to avoid the possibility of other errors caused by the updating failure.
In a second aspect, the present invention provides an apparatus for automatically updating a configuration file of a cluster management tool, where the apparatus includes:
The first acquisition module is used for respectively acquiring a first editing time stamp of a target configuration file corresponding to the initial running of the automatic updating script and a second editing time stamp of the target configuration file corresponding to the current running of the automatic updating script;
The second acquisition module is used for acquiring a distributed computing cluster configuration file if the first editing time stamp is inconsistent with the second editing time stamp;
The text processing module is used for performing text processing on the distributed computing cluster configuration file based on the text processing command to obtain text content corresponding to the distributed computing cluster configuration file;
And the updating module is used for automatically updating the text content corresponding to the distributed computing cluster configuration file to the cluster management tool configuration file according to the preset cluster management tool configuration file rule.
In a third aspect, the present invention provides a computer device comprising: the cluster management tool configuration file automatic updating method comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions so as to execute the cluster management tool configuration file automatic updating method according to the first aspect or any implementation mode corresponding to the first aspect.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a computer to perform the cluster management tool configuration file automatic updating method of the first aspect or any of the embodiments corresponding thereto.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a cluster management tool configuration file auto-update method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another cluster management tool configuration file auto-update method according to an embodiment of the invention;
FIG. 3 is a flow chart of a method for automatically updating cluster management tool configuration files according to an embodiment of the invention;
FIG. 4 is a block diagram of a cluster management tool configuration file auto-update in accordance with an embodiment of the invention;
fig. 5 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At present clustershell is the most commonly used cluster management tool, and along with the continuous progress of research and development work, the computing cluster is wholly presented with the diversification of server hardware, and the detailed management of different servers according to different queues is more reasonable. When the life cycle of an old server is close to retirement and offline, a large number of new servers are online, and the problems frequently encountered in daily operation and maintenance work at present have the following two aspects: (1) The queue server is changed frequently, so that clustershell tool configuration files are also required to be changed continuously, and the complexity of manual work is greatly increased; (2) When the batch operation is performed due to the change of the inadvertent queue server, the server which is not updated in the configuration file may miss the corresponding operation, thereby causing the user task failure or other unpredictable errors.
According to an embodiment of the present invention, there is provided an automatic cluster management tool profile updating method embodiment, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, and, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order other than that shown or described herein.
In this embodiment, an automatic updating method for a configuration file of a cluster management tool is provided, which may be used for a mobile terminal, and fig. 1 is a flowchart of the automatic updating method for the configuration file of the cluster management tool according to an embodiment of the present invention, as shown in fig. 1, where the flowchart includes the following steps:
Step S101, a first editing time stamp of a target configuration file corresponding to the initial running of the automatic updating script and a second editing time stamp of the target configuration file corresponding to the current running of the automatic updating script are respectively obtained.
In the embodiment of the invention, an automation updating instruction script, namely a linux shell automation script, is first run, and a first editing time stamp corresponding to a configuration file in the first run is recorded and marked as T1. The automation instruction is set as a timing task, and an automation updating instruction script is operated at a timing. And recording a second editing time stamp corresponding to the current running automatic update instruction script, and marking as T2.
The automatic updating script is operated as a timing task, the automatic updating script is operated every preset time length, the first operation time of the automatic updating script is determined as the first operation, and the first operation time of the automatic updating script is determined as the first operation every preset time length. For example, the automatic update script 8:00 starts to run, and runs once every 1 hour, the initial running time is 8:00, and the running time is 9:00, which is only used for illustration and not limitation.
Step S102, if the first editing time stamp is inconsistent with the second editing time stamp, a distributed computing cluster configuration file is obtained.
In the embodiment of the present invention, the first editing timestamp T1 and the second editing timestamp T2 are compared, and the editing timestamp is the last time the configuration text was written and saved. If the first editing time stamp T1 is inconsistent with the second editing time stamp T2, the distributed computing cluster configuration file is indicated to be possibly changed, the automation script is triggered continuously, configuration information is acquired through a distributed computing cluster command, a new text file is generated, the first configuration file F1 is counted, and cluster configuration conditions including a group and server information in the group are recorded.
And step S103, performing text processing on the distributed computing cluster configuration file based on the text processing command to obtain text content corresponding to the distributed computing cluster configuration file.
In the embodiment of the invention, text processing is performed on the first configuration file F1 through a linux shell command to obtain text content corresponding to the first configuration file F1.
Step S104, automatically updating text content corresponding to the distributed computing cluster configuration file to the cluster management tool configuration file according to a preset cluster management tool configuration file rule.
In the embodiment of the invention, the text content of the first configuration file F1 is updated to clustershell configuration file according to clustershell configuration file rules, so that the two configuration files are always consistent, the change generated by the automation script is transferred to the configuration file of the clustershell cluster management tool, the configuration file is directly grabbed to update the cluster management tool configuration file, and the problem that the two configuration files are inconsistent is avoided.
According to the automatic updating method for the configuration file of the cluster management tool, whether the configuration file of the distributed computing cluster is changed is confirmed by comparing the first editing time stamp with the second editing time stamp, and when the first editing time stamp is inconsistent with the second time stamp, the configuration file of the automatic updating script in running is obtained, so that the configuration file of the cluster management tool is automatically updated according to the text content corresponding to the configuration file, the step of manually updating the configuration file by manual repetition is omitted, and meanwhile the efficiency and the accuracy of updating the configuration file of the cluster management tool are improved.
In this embodiment, a method for automatically updating a configuration file of a cluster management tool is provided, and fig. 2 is a flowchart of a method for automatically updating a configuration file of a cluster management tool according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
Step S201, a first editing time stamp of a target configuration file corresponding to the initial running of the automatic updating script and a second editing time stamp of the target configuration file corresponding to the current running of the automatic updating script are respectively obtained.
Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S202, if the first editing time stamp is inconsistent with the second editing time stamp, a distributed computing cluster configuration file is obtained.
Specifically, the obtaining the distributed computing cluster configuration file in step S202 includes:
In step S2021, the automation script is used to obtain each queue information and the host information corresponding to each queue of the distributed computing cluster, and determine each queue information and the host information corresponding to each queue as the configuration file of the distributed computing cluster.
In the embodiment of the invention, a linux shell script is utilized to acquire queue name information Q and host name information H1, H2 and H3 … … Hn corresponding to each queue under the existing configuration, and the queue name information Q and the host name information H1, H2 and H3 … … Hn are recorded as a first configuration file F1.
A queue is composed of one or more servers, the number of the servers in the queue depends on the requirements of users, the servers in the queue can be added and deleted, and the cluster management tool configuration files are updated because the servers in the queue and the servers in the queue are added and deleted frequently.
And the configuration files corresponding to the cluster management tool are acquired by utilizing the automation script, so that the step of manually calling the current configuration files is omitted, and the acquisition efficiency of the configuration files is improved.
In step S203, if the first editing timestamp is consistent with the second editing timestamp, it is determined that the distributed computing configuration file is unchanged.
In the embodiment of the invention, if the first editing time stamp T1 is consistent with the second editing time stamp T2, the content of the distributed computing cluster configuration file is unchanged, so that the configuration file does not need to be processed, the cluster management tool configuration file does not need to be updated, and the automatic operation script is ended.
And confirming the change result of the configuration file when the script is automatically updated at the time of running according to the comparison result of the first editing time stamp and the second editing time stamp, and timely confirming the change condition of the configuration file.
Step S204, the second editing time stamp is updated to be the new first editing time stamp.
In the embodiment of the present invention, the second editing time stamp T2 is overlaid on the first editing time stamp T1, that is, the second editing time stamp T2 is determined as a new judgment starting point time stamp T1, and is the time stamp corresponding to the first running time of the cluster management tool, and steps S201 to S206 are repeated. When there is a new timestamp, i.e. the second editing timestamp T2 does not coincide with the first editing timestamp T1, the second editing timestamp T2 is updated to the new first editing timestamp T1. For example, if the previous editing time stamp is 2023, 8, 1, 10, and the latest editing time stamp is 2023, 8, 2, 10, then the new editing time stamp 2023, 8, 2, 10 is taken as the new judgment starting time stamp.
It should be noted that, the update frequency of the timestamp is set according to the running period of the automatic update script, and the running period of the automatic update script may be set according to the user requirement, or may be set according to the actual application scenario, which is not limited herein.
For example, the running period of the automatic update script is once per day, and in order to monitor the change of the time stamp and update the time stamp in real time, the time stamp is updated once per hour, so that the update frequency of the time stamp is quickened, and the accuracy of the time stamp is improved; the running period of the automatic updating script is once per month, and in order to reduce the data volume generated by updating the time stamp, the time stamp is updated once per day, so that the system running cost is reduced, and the data processing efficiency is improved.
Preferably, the time stamp can be automatically updated every 6 hours, so that the data volume generated by frequent updating of the time stamp is reduced while the time stamp is updated in real time, the time stamp change is monitored in real time, and the accuracy of the time stamp is ensured, the operation cost of the system is reduced, and the data processing efficiency is improved, which is only used as an example and not a limitation.
Step S205, text processing is performed on the distributed computing cluster configuration file based on the text processing command, so as to obtain text content corresponding to the distributed computing cluster configuration file.
Please refer to step S103 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S206, automatically updating text content corresponding to the distributed computing cluster configuration file to the cluster management tool configuration file according to a preset cluster management tool configuration file rule.
Please refer to step S104 in the embodiment shown in fig. 1, which is not described here again
According to the cluster management tool configuration file automatic updating method provided by the embodiment, the second editing time stamp is determined to be the time stamp corresponding to the initial running time of the automatic updating script.
The second editing time stamp is used as the time stamp of the initial running of the automatic updating script, so that the change condition of the configuration file is judged again, and the change condition of the configuration file is confirmed in time.
In this embodiment, a method for automatically updating a configuration file of a cluster management tool is provided, and fig. 3 is a flowchart of a method for automatically updating a configuration file of a cluster management tool according to an embodiment of the present invention, as shown in fig. 3, where the flowchart includes the following steps:
Step S301, a first editing timestamp of a target configuration file corresponding to the initial running of the automatic update script and a second editing timestamp of the target configuration file corresponding to the current running of the automatic update script are obtained respectively.
Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
In step S302, if the first editing timestamp is inconsistent with the second editing timestamp, the distributed computing cluster configuration file is obtained.
Please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S303, text processing is carried out on the distributed computing cluster configuration file based on the text processing command, and text content corresponding to the distributed computing cluster configuration file is obtained.
Please refer to step S103 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S304, automatically updating text content corresponding to the distributed computing cluster configuration file to the cluster management tool configuration file according to a preset cluster management tool configuration file rule.
Please refer to step S104 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S305, verifying the updated status of the updated cluster management tool configuration file.
In the embodiment of the invention, the cluster management tool configuration file is updated, the update abnormality possibly occurs, the updated update state of the updated cluster management tool configuration file is verified, and whether the update is successful or not is timely determined, so that management staff can conveniently control the update state in time. And verifying the updated state of the updated cluster management tool configuration file to increase the accuracy of the updated state, and reduce the possibility that the configuration file is not successfully updated and not found in time.
In some alternative embodiments, the step S305 includes:
In step S3051, an updated cluster management tool configuration file is obtained, where the updated cluster management tool configuration file includes each queue information and host information corresponding to each queue in the updated cluster configuration.
In step S3052, if the distributed computing cluster configuration file is consistent with the updated cluster management tool configuration file, it is determined that the cluster management tool configuration file is updated successfully.
In the embodiment of the present invention, an updated cluster management tool configuration file is obtained, that is, the content of the first configuration file F1 is updated to clustershell configuration files according to the cluster shell configuration file rule, and the queue name information Q1: h1, H2, H3 … … Hn, Q2: j1, J2, J3 … … Jn, and so on.
The host name and the group name of each queue are captured by utilizing clustershell own commands and are marked as a second configuration file F2, wherein the group name corresponds to the queue name.
The first profile F1 and the second profile F2 are compared using a linux tool, such as meld or diff tool. If the first configuration file F1 and the second configuration file F2 are completely consistent, it is indicated clustershell that the queue server information in the configuration file and the current distributed computing cluster queue server information are completely consistent, that is, the step of manually updating the configuration file is omitted by the method.
Comparing the updated configuration file with the configuration file of the first running distributed computing cluster to confirm the updating condition of the configuration file of the cluster management tool according to the comparison result and confirm the updating condition of the configuration file in time, thereby being convenient for a manager to carry out the next processing according to the updating condition of the configuration file.
In step S3053, if the distributed computing cluster configuration file is inconsistent with the updated cluster management tool configuration file, it is determined that the cluster management tool configuration file fails to update, and update abnormality alarm information is generated.
In the embodiment of the invention, if the first configuration file F1 and the second configuration file F2 are inconsistent, confirming that the cluster management tool configuration file is failed to update, possibly generating abnormality during the updating of the automatic script, generating the abnormal updating alarm information, calling a system mail function, and informing a system administrator of the result as mail content to perform manual confirmation.
According to the automatic updating method for the cluster management tool configuration file, the updating condition of the cluster management tool configuration file is confirmed according to the comparison result, the updating condition of the configuration file is confirmed timely, and when the updating of the cluster management tool configuration file fails, the updating abnormal alarm information is generated, so that a manager is reminded of timely processing the abnormal condition, and the possibility of other errors caused by the updating failure is avoided.
The embodiment also provides an automatic updating device for the configuration file of the cluster management tool, which is used for implementing the foregoing embodiments and preferred implementation manners, and the description thereof is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The embodiment provides an automatic updating device for a configuration file of a cluster management tool, as shown in fig. 4, including:
The first obtaining module 401 is configured to obtain a first editing timestamp of a target configuration file corresponding to the initial running time of the automatic update script and a second editing timestamp of the target configuration file corresponding to the current running time of the automatic update script, respectively.
The second obtaining module 402 is configured to obtain the distributed computing cluster configuration file if the first editing timestamp and the second editing timestamp are inconsistent.
The text processing module 403 is configured to perform text processing on the distributed computing cluster configuration file based on the text processing command, so as to obtain text content corresponding to the distributed computing cluster configuration file.
And the updating module 404 is configured to automatically update the text content corresponding to the distributed computing cluster configuration file to the cluster management tool configuration file according to the preset cluster management tool configuration file rule.
In some alternative embodiments, the apparatus further comprises:
And the first determining module is used for determining that the distributed computing cluster configuration file is unchanged if the first editing time stamp is consistent with the second editing time stamp.
In some alternative embodiments, the second acquisition module 402 includes:
The first acquisition unit is used for acquiring each queue information and host information corresponding to each queue of the distributed computing cluster by utilizing an automation script, and determining each queue information and host information corresponding to each queue as a configuration file of the distributed computing cluster.
In some alternative embodiments, the apparatus further comprises:
and the second determining module updates the second editing time stamp to be a new first editing time stamp.
In some alternative embodiments, the apparatus further comprises:
And the verification module is used for verifying the updated state of the updated cluster management tool configuration file.
In some alternative embodiments, the verification module includes:
The second obtaining unit is used for obtaining an updated cluster management tool configuration file, wherein the updated cluster management tool configuration file comprises all the queue information and host information corresponding to all the queues under the updated cluster configuration.
And the first determining unit is used for determining that the cluster management tool configuration file is updated successfully if the distributed computing cluster configuration file is consistent with the updated cluster management tool configuration file.
In some alternative embodiments, the apparatus further comprises:
And the third determining module is used for determining that the cluster management tool configuration file fails to update if the distributed computing cluster configuration file is inconsistent with the updated cluster management tool configuration file, and generating updated abnormal alarm information.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The cluster management tool configuration file automatic updating apparatus in this embodiment is presented in the form of a functional unit, where a unit refers to an ASIC (Application SPECIFIC INTEGRATED Circuit) Circuit, a processor and a memory that execute one or more software or fixed programs, and/or other devices that can provide the above functions.
The embodiment of the invention also provides a computer device which is provided with the automatic updating device for the cluster management tool configuration file shown in the figure 4.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 5, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 5.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device further comprises input means 30 and output means 40. The processor 10, memory 20, input device 30, and output device 40 may be connected by a bus or other means, for example in fig. 5.
The input means 30 may receive entered numeric or character information and generate key signal inputs related to user settings and function control of the computer device, such as a touch screen. The output device 40 may comprise a display apparatus.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (9)

1. A method for automatically updating a cluster management tool configuration file, the method comprising:
Respectively acquiring a first editing time stamp of a target configuration file corresponding to the initial running of the automatic updating script and a second editing time stamp of the target configuration file corresponding to the current running of the automatic updating script;
if the first editing time stamp is inconsistent with the second editing time stamp, acquiring a distributed computing cluster configuration file;
text processing is carried out on the distributed computing cluster configuration file based on the text processing command, and text content corresponding to the distributed computing cluster configuration file is obtained;
Automatically updating text content corresponding to the distributed computing cluster configuration file to a cluster management tool configuration file according to a preset cluster management tool configuration file rule;
the obtaining the distributed computing cluster configuration file includes:
And acquiring the queue information and the host computer information corresponding to each queue under the existing configuration of the distributed computing cluster by using the linux shell automation script, and determining the queue information and the host computer information corresponding to each queue as a configuration file of the distributed computing cluster.
2. The method according to claim 1, wherein the method further comprises:
and if the first editing time stamp is consistent with the second editing time stamp, determining that the distributed computing cluster configuration file is unchanged.
3. The method of claim 1, wherein after obtaining the distributed computing cluster configuration file, the method further comprises:
updating the second editing time stamp to be a new first editing time stamp.
4. The method of claim 1, wherein after automatically updating text content corresponding to the distributed computing cluster configuration file to a cluster management tool configuration file according to a preset cluster management tool configuration file rule, the method further comprises:
And verifying the updated state of the updated cluster management tool configuration file.
5. The method of claim 4, wherein verifying the updated cluster management tool configuration file update status comprises:
Acquiring an updated cluster management tool configuration file, wherein the updated cluster management tool configuration file comprises all the queue information and host information corresponding to all the queues under the updated cluster configuration;
and if the distributed computing cluster configuration file is consistent with the updated cluster management tool configuration file, determining that the cluster management tool configuration file is updated successfully.
6. The method of claim 5, wherein the method further comprises:
if the distributed computing cluster configuration file is inconsistent with the updated cluster management tool configuration file, determining that the cluster management tool configuration file fails to update, and generating update abnormality alarm information.
7. An apparatus for automatically updating a cluster management tool configuration file, the apparatus comprising:
The first acquisition module is used for respectively acquiring a first editing time stamp of a target configuration file corresponding to the initial running of the automatic updating script and a second editing time stamp of the target configuration file corresponding to the current running of the automatic updating script;
The second acquisition module is used for acquiring a distributed computing cluster configuration file if the first editing time stamp is inconsistent with the second editing time stamp;
The text processing module is used for performing text processing on the distributed computing cluster configuration file based on the text processing command to obtain text content corresponding to the distributed computing cluster configuration file;
The updating module is used for automatically updating text content corresponding to the distributed computing cluster configuration file to the cluster management tool configuration file according to a preset cluster management tool configuration file rule;
The second obtaining module is specifically configured to:
And acquiring the queue information and the host computer information corresponding to each queue under the existing configuration of the distributed computing cluster by using the linux shell automation script, and determining the queue information and the host computer information corresponding to each queue as a configuration file of the distributed computing cluster.
8. A computer device, comprising:
A memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the cluster management tool profile auto-updating method of any one of claims 1 to 6.
9. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the cluster management tool profile automatic updating method of any one of claims 1to 6.
CN202311193419.9A 2023-09-15 2023-09-15 Automatic updating method, device and equipment for cluster management tool configuration file Active CN117240711B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311193419.9A CN117240711B (en) 2023-09-15 2023-09-15 Automatic updating method, device and equipment for cluster management tool configuration file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311193419.9A CN117240711B (en) 2023-09-15 2023-09-15 Automatic updating method, device and equipment for cluster management tool configuration file

Publications (2)

Publication Number Publication Date
CN117240711A CN117240711A (en) 2023-12-15
CN117240711B true CN117240711B (en) 2024-05-24

Family

ID=89092380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311193419.9A Active CN117240711B (en) 2023-09-15 2023-09-15 Automatic updating method, device and equipment for cluster management tool configuration file

Country Status (1)

Country Link
CN (1) CN117240711B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243515A (en) * 2013-06-13 2014-12-24 中兴通讯股份有限公司 Method and device for processing configuration information
CN109240716A (en) * 2018-09-10 2019-01-18 福建星瑞格软件有限公司 A kind of big data platform version management and iteratively faster dispositions method and system
CN110545207A (en) * 2019-09-12 2019-12-06 四川长虹电器股份有限公司 Synchronous automatic intelligent DNS system and configuration method
CN111259025A (en) * 2020-01-14 2020-06-09 河海大学 Self-adaptive frequency conversion increment updating method for multi-source heterogeneous data
CN111679860A (en) * 2020-08-12 2020-09-18 上海冰鉴信息科技有限公司 Distributed information processing method and device
CN113468170A (en) * 2021-06-02 2021-10-01 上海赛可出行科技服务有限公司 System for automatically realizing real-time data synchronization
CN114003252A (en) * 2021-09-26 2022-02-01 苏州浪潮智能科技有限公司 Method, system, terminal and storage medium for automatically updating configuration file

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243515A (en) * 2013-06-13 2014-12-24 中兴通讯股份有限公司 Method and device for processing configuration information
CN109240716A (en) * 2018-09-10 2019-01-18 福建星瑞格软件有限公司 A kind of big data platform version management and iteratively faster dispositions method and system
CN110545207A (en) * 2019-09-12 2019-12-06 四川长虹电器股份有限公司 Synchronous automatic intelligent DNS system and configuration method
CN111259025A (en) * 2020-01-14 2020-06-09 河海大学 Self-adaptive frequency conversion increment updating method for multi-source heterogeneous data
CN111679860A (en) * 2020-08-12 2020-09-18 上海冰鉴信息科技有限公司 Distributed information processing method and device
CN113468170A (en) * 2021-06-02 2021-10-01 上海赛可出行科技服务有限公司 System for automatically realizing real-time data synchronization
CN114003252A (en) * 2021-09-26 2022-02-01 苏州浪潮智能科技有限公司 Method, system, terminal and storage medium for automatically updating configuration file

Also Published As

Publication number Publication date
CN117240711A (en) 2023-12-15

Similar Documents

Publication Publication Date Title
CN111274052A (en) Data distribution method, server, and computer-readable storage medium
CN110007946B (en) Method, device, equipment and medium for updating algorithm model
CN108491304B (en) electronic device, business system risk control method and storage medium
CN109598427B (en) Robot management method and device and electronic equipment
CN117389843B (en) Intelligent operation and maintenance system, method, electronic equipment and storage medium
CN113886590A (en) Data summarizing method and device, computer equipment and storage medium
CN117240711B (en) Automatic updating method, device and equipment for cluster management tool configuration file
CN116578497A (en) Automatic interface testing method, system, computer equipment and storage medium
CN112001707A (en) Business workflow generation method and system based on business data
CN114328083B (en) WDT monitoring method, device and medium
CN113595762B (en) Network card configuration storage method and device
CN104714856A (en) Software repairing method and terminal equipment
CN114553859A (en) BMC configuration management method and device, electronic equipment and storage medium
CN114490196A (en) Database switching method, system, device and medium
CN109542598B (en) Timed task management method and device
CN116391177A (en) Prioritized inactive memory device updates
CN109445824B (en) Updating method and system of measurement and control device and terminal equipment
CN113656378A (en) Server management method, device and medium
CN108566293B (en) Electronic device, zk node information notification method, and storage medium
CN111381932A (en) Method and device for triggering application program change, electronic equipment and storage medium
CN112907221B (en) Self-service method, device and system
CN112486556B (en) Method, system, terminal and storage medium for server to be compatible with BMC
CN117608925A (en) Application restarting method and device, electronic equipment and storage medium
CN116719860A (en) Question number query method, device, system, electronic equipment and medium
CN115827050A (en) Data calling method and device, electronic equipment and storage 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