Container Watchdog Drive Segmentation for Process Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current operating systems can only ensure system-level reliability through a single watchdog drive, which cannot delete processes at a container level, limiting the reliability of containerized applications in telecommunications services.
Innovation Solution
Implementing multiple watchdog instances, each associated with a container, that include timers to monitor and delete processes within a specified container namespace, ensuring container-granularity process processing without affecting other containers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a single watchdog drive is used to monitor the entire system, then system-level reliability is ensured, but container-level process management capability is lost
Solution Approach 1:
The watchdog drive is segmented into multiple watchdog instances, each responsible for monitoring a specific container. The kernel divides the single watchdog drive into N independent instances, where each instance can independently manage processes within its designated container namespace, thereby achieving container-level granularity while maintaining system-level reliability through the collective operation of all instances
Solution Approach 2:
The system transitions from a single-dimension (system-level) watchdog approach to a multi-dimensional (container-level) approach by introducing namespace isolation as an additional dimension. Each watchdog instance operates in its own namespace context, enabling simultaneous system-level and container-level monitoring without interference between different monitoring scopes
2Adaptability or versatility
If multiple watchdog instances are implemented for container-level monitoring, then container-granularity process processing is achieved, but device complexity increases
Solution Approach 1:
The watchdog drive is designed with multi-functionality to serve both system-level and container-level monitoring needs. Each watchdog instance is a universal component that can operate independently for container monitoring while collectively contributing to system-level reliability, eliminating the need for separate monitoring mechanisms for different granularities
Solution Approach 2:
Multiple watchdog instances are merged into a single watchdog drive kernel module, sharing common resources such as the timer mechanism and namespace management infrastructure. This merging approach reduces overall system complexity compared to implementing completely separate watchdog drives for each container, while still maintaining independent monitoring capabilities
Data Source
Figure 1~2
Figure 3
Figure 4~5
AI summary
Embodiments of this application provide a process processing method in a container. The method is used in a physical machine, multiple containers are deployed on the physical machine, the physical machine includes a watchdog watchdog drive, and the method includes: receiving, by the watchdog drive, a first operation instruction of a first container by using a device file dev, where the first operation instruction includes a first process identification PID, and the first PID represents that the first operation instruction is delivered by a first process in the first container; determining, according to the first PID, first namespace namespace corresponding to the first container; and deleting all processes in the first container according to the first namespace. Therefore, without affecting a process in another container, the watchdog drive can delete all processes in a specified container after determining namespace of the container, thereby implementing container-granularity process processing.