Container resource limiting, fault monitoring and recovering method
A technology for resource limitation and fault monitoring, applied in the direction of instruments, program control design, program control devices, etc., can solve the problem of inability to monitor health status in fine-grained manner, poor stability and maintainability of container management systems, and inability to quickly restore containers across hosts and other problems, to achieve the effect of strong stability and maintainability, and low coupling
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0041] like figure 1 As shown, an embodiment of the present invention provides a container resource limitation method, and the method includes the following steps:
[0042] Start the specified container, set the PID of the container startup process itself to the cgroup resource limit group such as CPU and memory, and set the limit value of cgroup resources such as CPU and memory;
[0043] Specify the systemd resource limit group of the container process as a non-system resource limit group to get rid of the control of the system service on the container resource limit group;
[0044] The container directory is generated by joint mounting of the mirror directory, and then the container namespace is created;
[0045] Execute the command command of the container to start the first process of the container;
[0046] If the first process of the container fails to start, release the container mount point and cgroup resources and update the container running status to exit;
[004...
Embodiment 2
[0052] The embodiment of the present invention provides a container fault monitoring method, and the implementation environment of the method is: after the container is successfully started based on the method described in the first embodiment, the container head process is taken over by the host process No. 1. The container process is divided into the first process, the persistent process and the business process, and the first process of the container is configured to pull up multiple business processes in batches and execute the persistent process to keep the container running all the time. It should be noted that the so-called host process No. 1 is the init process in the operating system.
[0053] like figure 2 As shown, the container fault monitoring method provided by the embodiment of the present invention can be executed by a host, and specifically can be implemented by a separate monitoring program in the host, and the method includes the following steps:
[0054] ...
Embodiment 3
[0083] This embodiment provides a container fault monitoring method, which is based on the same technical concept as the second embodiment, and both can start a separate monitoring program on the host to execute the container fault monitoring method, so as to monitor the operation of the business process in the container The difference from the second embodiment is that the container fault monitoring method is further described in this embodiment in conjunction with an example, and the details are as follows:
[0084] like image 3 As shown, two containers are started on the host, namely container a and container b; among them, in container a: / bin / bash / usr / sys103_start.sh is the container first process, / bin / bash is the persistent process, app_warn, app_monitor, and app_server are all business processes; the same business process is also started in container b. The business process in container a reports the process startup command and parameters app_warn -service sys -inst...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com