Early warning processing method and system of container cluster in CICD process
Patent Information
- Application Number
- CN202211362038.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-02
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2042-11-02
AI Technical Summary
但在CICD (持续集成、持续交付和持续部署)过程中因集群滚动更新,也会导致控制器输出预警信息,此时的预警信息不必要且不正确的,应该加以抑制,否则监控系统会收到无用数据,造成运维人员对预警信息的敏感度下降
[0014]本发明提供了一种容器集群在CICD过程中的预警处理方法和系统,该方法应用于容器集群监控系统,包括:首先基于预先接收到的业务控制器参数,将当前待更新的业务控制器的标识调整为更新状态;业务控制器参数由CICD系统发送至容器集群监控系统; 然后响应于针对容器集群的滚动更新,检测并在一段时间内抑制事件告警信息的发布;事件告警信息由标识为更新状态的业务控制器滚动更新时产生,解决了现有技术中存在的预警误报率高的技术问题,达到了降低预警误报率、提高运维质量的技术效果。
Smart Images

Figure CN115543752B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method and system for early warning processing of container clusters in the CICD process. Background Technology
[0002] During abnormal operation of a container cluster's POD (Programmable Item) function, event alerts are generated, such as POD restarts and Out of Memory (OOM) errors. These are normal event alerts. However, during CICD (Continuous Integration, Continuous Delivery, and Continuous Deployment), the cluster's rolling updates can also cause the controller to output alerts. These alerts are unnecessary and incorrect and should be suppressed; otherwise, the monitoring system will receive useless data, reducing the sensitivity of operations personnel to alert information. In other words, current technology presents a problem of erroneous alerts in container clusters during CICD processes. Summary of the Invention
[0003] The purpose of this invention is to provide a method and apparatus for early warning processing in the CICD process of container clusters, so as to alleviate the technical problem of high false alarm rate in the prior art.
[0004] In a first aspect, embodiments of the present invention provide a method for early warning processing of container clusters during CICD processes, applied to a container cluster monitoring system, the method comprising: Based on the pre-received service controller parameters, the identifier of the service controller currently awaiting update is adjusted to the update state; the aforementioned service controller parameters are sent from the CICD system to the aforementioned container cluster monitoring system; In response to rolling updates to the container cluster, the release of event alarm information is detected and suppressed for a period of time; the aforementioned event alarm information is generated when the aforementioned business controller, which is marked as being in an update state, performs a rolling update.
[0005] In some possible implementations, the method further includes: adjusting the identifier of the updated service controller to the node state based on the received updated service controller parameters.
[0006] In some possible implementations, the method further includes: detecting and publishing current event alarm information based on the node status; the current event alarm information is generated when the updated business controller experiences a business operation anomaly.
[0007] In some possible implementations, the method further includes: in response to a service rollback operation for the container cluster, detecting and receiving a flag reset action sent by the CICD system; the flag reset action is used to adjust the flag of the service controller to the node state.
[0008] In some possible implementations, adjusting the identifier of the service controller to be updated to an updated state based on the pre-received service controller parameters includes: performing a search in the container cluster based on the pre-received service controller parameters and determining the search results; determining the current identifier of the service controller based on the search results; and adjusting the current identifier to an updated state if the current identifier is a node state.
[0009] In some possible implementations, the above-mentioned service controller parameters include the controller name and the suppression time.
[0010] Secondly, embodiments of the present invention provide an early warning processing system for container clusters during the CICD process, applied to a container cluster monitoring system, the system comprising: The identifier adjustment module is used to adjust the identifier of the currently pending business controller to the updated state based on the pre-received business controller parameters; the aforementioned business controller parameters are sent from the CICD system to the aforementioned container cluster monitoring system; The suppression release module is used to detect and suppress the release of event alarm information for a period of time in response to rolling updates to the container cluster; the aforementioned event alarm information is generated when the aforementioned business controller, which is marked as being in an update state, performs a rolling update.
[0011] In some possible implementations, the aforementioned identifier adjustment module is further configured to: adjust the identifier of the updated service controller to the node state based on the received updated service controller parameters.
[0012] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the steps of the method described in any of the first aspects above.
[0013] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to perform the method described in any of the first aspects above.
[0014] This invention provides a method and system for early warning processing in the CICD process of container clusters. The method is applied to a container cluster monitoring system and includes: firstly, based on pre-received service controller parameters, adjusting the identifier of the service controller currently to be updated to an update state; the service controller parameters are sent from the CICD system to the container cluster monitoring system; then, in response to the rolling update of the container cluster, detecting and suppressing the release of event alarm information for a period of time; the event alarm information is generated when the service controller identified as being in the update state is rolled up. This invention solves the technical problem of high false alarm rate in the prior art and achieves the technical effect of reducing the false alarm rate and improving the quality of operation and maintenance. Attached Figure Description
[0015] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0016] Figure 1 A flowchart illustrating an early warning processing method for a container cluster in the CICD process, provided by an embodiment of the present invention; Figure 2 A flowchart illustrating another method for handling early warnings in CICD processes for container clusters provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an early warning processing system for a container cluster in the CICD process, provided by an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0018] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0019] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Some embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0020] During abnormal operation of a container cluster's POD (Programmable Item) function, event alerts are generated, such as POD restarts and Out of Memory (OOM) errors. These are normal event alerts. However, during CICD (Continuous Integration, Continuous Delivery, and Continuous Deployment), the cluster's rolling updates can also cause the controller to output alerts. These alerts are unnecessary and incorrect and should be suppressed; otherwise, the monitoring system will receive useless data, reducing the sensitivity of operations personnel to alert information. In other words, current technology presents a problem of erroneous alerts in container clusters during CICD processes.
[0021] Based on this, embodiments of the present invention provide a method and apparatus for early warning processing of container clusters in the CICD process, so as to alleviate the technical problem of high false alarm rate in the prior art.
[0022] To facilitate understanding of this embodiment, a detailed description of the early warning processing method for container clusters in the CICD process disclosed in this embodiment of the invention will be provided first. CICD is the process of continuous integration and continuous deployment. CI (Continuous Integration) is the process of building software and completing initial testing; CD (Continuous Deployment) is the process of combining code with infrastructure, ensuring that all tests are completed and policies are followed, and then deploying the code to the expected environment.
[0023] See Figure 1 The diagram illustrates a method for handling early warnings in a container cluster during the CICD process. This method can be executed by electronic devices and mainly includes the following steps S110 to S120: S110: Based on the pre-received service controller parameters, adjust the identifier of the service controller currently awaiting update to the update state; wherein, the service controller parameters are sent from the CICD system to the container cluster monitoring system; In this embodiment, the CICD system can be a pre-built system used to implement the CICD process and execute specific tasks, facilitating the implementation of related server-side technologies. The current business represented by the business controller parameters can be a specific CICD task, such as releasing a new version.
[0024] S120: In response to rolling updates for container clusters, detect and suppress the release of event alarm information for a period of time; event alarm information is generated when the business controller, which is identified as being in an update state, performs a rolling update.
[0025] In one embodiment, the method further includes: adjusting the identifier of the updated service controller to the node state based on the received updated service controller parameters.
[0026] In one embodiment, the method further includes: detecting and publishing current event alarm information based on the node status; the current event alarm information is generated when the updated service controller experiences a service operation abnormality.
[0027] In one embodiment, the method further includes: in response to a service rollback operation for the container cluster, detecting and receiving a flag reset action sent by the CICD system; the flag reset action is used to adjust the flag of the service controller to the node state.
[0028] In one embodiment, adjusting the identifier of the service controller to be updated to an updated state based on pre-received service controller parameters includes: performing a search in the container cluster based on the pre-received service controller parameters to determine the search results; determining the current identifier of the service controller based on the search results; and adjusting the current identifier to an updated state if the current identifier is a node state.
[0029] In one embodiment, the business controller parameters include the controller name and the suppression time. Typically, the core business controller parameters include the controller name; additionally, a suppression time parameter can be added to prevent issues arising from abnormal deployment processes or CICD system errors that prevent the identifier from being corrected to the node state.
[0030] Because normal CICD processes also generate event warnings, operations and maintenance personnel may lose sensitivity to monitoring information, thus reducing system stability. The warning handling method for container clusters during CICD processes provided in this embodiment can completely solve the problem of false alarms and improve operational quality. As a specific example, this embodiment provides a warning handling method for container clusters during CICD processes; see [link to relevant documentation]. Figure 2 As shown, the specific process includes the following: S21 - CICD process initiation, passing parameters to the container cluster.
[0031] The CICD center transmits parameters (business controller) to the container cluster monitoring program based on the current task to indicate that the business controller is currently entering CICD rolling updates.
[0032] S22 - The monitoring program processes parameters of the CICD system (i.e., suppresses error warnings).
[0033] After receiving the CICD system business controller parameters, the monitoring system searches for the controller in the container cluster. If the controller can be found and its current identifier is None, then the controller is marked as being under maintenance and enters the maintenance cycle.
[0034] S23 - The container cluster is performing rolling updates normally.
[0035] The container cluster is performing rolling updates normally according to CICD requirements. At this time, since the controller has been marked as under maintenance, the monitoring system will actively suppress the early warning system to avoid the system from making erroneous early warning actions.
[0036] Example of suppression process: The current business controllers running in the container cluster are as follows: [A,B,C,D,E]. When the CICD task starts, assuming that the current update is the business of controller A, the CICD system actively notifies the container cluster that business controller A needs to be updated (passing parameter A to the container cluster). When the container cluster receives that controller A needs to be updated, it immediately adjusts the identifier of controller A to update. When the business controller starts rolling updates, a new event warning is generated, but at the same time, controller A has been marked as update. At this time, the alarm information will not be sent, and the suppression process is completed.
[0037] After the rolling update is completed, the CICD system will send the identifier parameter to the container cluster again and adjust the identifier of controller A to None. If controller A generates new event information due to abnormal business operation, the alarm system will issue a normal alarm.
[0038] S24 - CICD process ends, send flag reset action to container cluster.
[0039] After the entire CICD rolling update is fully settled, CICD will again transmit parameters to the cluster, change the status of the controller's flag bit from maintenance to None, and enter normal event monitoring.
[0040] S25 - Exception handling.
[0041] If a release fails or a rollback is required during the rolling update process, the CICD system should also issue a flag reset action to the container cluster after the overall task is completed.
[0042] This invention provides an early warning processing method for container clusters during CICD (Computer Integrated Development) processes. This method is applied to a container cluster monitoring system and includes: firstly, based on pre-received service controller parameters, adjusting the identifier of the currently updated service controller to an updated state; the service controller parameters are sent from the CICD system to the container cluster monitoring system; then, in response to the rolling update of the container cluster, detecting and suppressing the release of event alarm information for a period of time; the event alarm information is generated when the service controller identified as being in an updated state is rolled over. This solves the technical problem of high false alarm rate in existing technologies, achieving the technical effect of reducing false alarm rate and improving operational quality.
[0043] Furthermore, embodiments of the present invention also provide an early warning processing system for container clusters during the CICD process, see [link to relevant documentation]. Figure 3 As shown, the system includes: The identifier adjustment module 310 is used to adjust the identifier of the currently pending business controller to the updated state based on the pre-received business controller parameters; the business controller parameters are sent from the CICD system to the container cluster monitoring system; The suppression release module 320 is used to detect and suppress the release of event alarm information for a period of time in response to rolling updates for the container cluster; the event alarm information is generated by the business controller marked as being in the update state during rolling updates.
[0044] In one embodiment, the identifier adjustment module is further configured to: adjust the identifier of the updated service controller to the node state based on the received updated service controller parameters.
[0045] The container cluster early warning processing system in the CICD process provided in this application embodiment can be specific hardware on the device or software or firmware installed on the device. The device provided in this application embodiment has the same implementation principle and technical effects as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. The container cluster early warning processing system in the CICD process provided in this application embodiment has the same technical features as the container cluster early warning processing method in the CICD process provided in the aforementioned embodiments, and therefore can solve the same technical problems and achieve the same technical effects.
[0046] This application also provides an electronic device, specifically, the electronic device includes a processor and a storage device; the storage device stores a computer program, and the computer program, when run by the processor, executes the method described in any of the above embodiments.
[0047] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 400 includes: a processor 40, a memory 41, a bus 42, and a communication interface 43. The processor 40, the communication interface 43, and the memory 41 are connected through the bus 42. The processor 40 is used to execute executable modules, such as computer programs, stored in the memory 41.
[0048] The memory 41 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 43 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0049] Bus 42 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0050] The memory 41 is used to store programs. After receiving an execution instruction, the processor 40 executes the program. The method executed by the device for defining the flow process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 40 or implemented by the processor 40.
[0051] Processor 40 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 40 or by instructions in software form. Processor 40 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 41. The processor 40 reads the information in memory 41 and, in conjunction with its hardware, completes the steps of the above method.
[0052] Corresponding to the above method, this application embodiment also provides a computer-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and run by a processor, the machine-executable instructions cause the processor to perform the steps of the above method.
[0053] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0054] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0055] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0056] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0057] It should be noted that similar reference numerals and letters in the accompanying drawings indicate similar items. Therefore, once an item is defined in one accompanying drawing, it does not need to be further defined and explained in subsequent accompanying drawings. In addition, the terms "first," "second," "third," etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for early warning processing in the CICD process of a container cluster, characterized in that, The method, applied to a container cluster monitoring system, includes: Based on the pre-received service controller parameters, the identifier of the service controller currently awaiting update is adjusted to an update state; the service controller parameters are sent from the CICD system to the container cluster monitoring system; the service controller parameters include the controller name and the suppression time; In response to a rolling update for the container cluster, the publication of event alarm information is detected and suppressed within the suppression time; the event alarm information is generated when the service controller, which is identified as being in an update state, performs a rolling update. Furthermore, after the rolling update is completed, based on the received updated service controller parameters, the updated identifier of the service controller is adjusted to the node state to restore normal event monitoring of the service controller. The suppression time is used to prevent situations where the release process is abnormal or the CICD system causes the identifier to be unable to be corrected to the node state.
2. The early warning processing method for container clusters in the CICD process according to claim 1, characterized in that, The method further includes: Based on the node status, detect and publish current event alarm information; the current event alarm information is generated when the updated business controller experiences a business operation abnormality.
3. The early warning processing method for container clusters in the CICD process according to claim 1, characterized in that, The method further includes: In response to a service rollback operation for the container cluster, the system detects and receives an identifier reset action sent by the CICD system; the identifier reset action is used to adjust the identifier of the service controller to the node state.
4. The early warning processing method for container clusters in the CICD process according to claim 1, characterized in that, Based on the pre-received service controller parameters, the identifier of the service controller currently awaiting update is adjusted to an update state, including: Based on the pre-received business controller parameters, a search is performed in the container cluster to determine the search results; Based on the search results, determine the current identifier of the service controller; If the current identifier is a node state, then the current identifier is adjusted to an update state.
5. A warning processing system for container clusters in the CICD process, characterized in that, This is applied to a container cluster monitoring system, the system comprising: The identifier adjustment module is used to adjust the identifier of the currently pending service controller to an updated state based on the pre-received service controller parameters; the service controller parameters are sent from the CICD system to the container cluster monitoring system; the service controller parameters include the controller name and the suppression time; The suppression release module is used to detect and suppress the release of event alarm information in response to rolling updates to the container cluster within the suppression time period; the event alarm information is generated by the business controller, which is identified as being in an update state, during rolling updates. Furthermore, after the rolling update is completed, based on the received updated service controller parameters, the updated identifier of the service controller is adjusted to the node state to restore normal event monitoring of the service controller. The suppression time is used to prevent situations where the release process is abnormal or the CICD system causes the identifier to be unable to be corrected to the node state.
6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Software release method and device based on Jenkins and electronic equipment
CN114168213A
Monitoring method and device for containers in cluster and computer readable storage medium
CN114911677A