Container Log Access via Virtual Disk and Socket
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In containerized applications deployed using Kubernetes, administrators face challenges in selectively accessing logs across different containers, especially when logs are generated at varying rates, and there is a need to retrieve logs for previous instances or specific time durations or sizes efficiently.
Innovation Solution
A method is provided to access container logs in a clustered container host system by retrieving log information from a virtual machine's virtual disk, streaming log data over a communication channel, and preparing requested log information for transmission to a VM management process, which forwards it to the requester, utilizing a virtual socket communication channel for HTTP requests.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If administrators access logs from all containers, then complete log information is obtained, but log retrieval becomes inefficient and difficult to manage
Solution Approach 1:
The patent segments log retrieval by introducing container identifiers as a filtering criterion. The log management system divides the universal log space into container-specific segments, allowing administrators to selectively access logs from specific containers rather than retrieving all logs. This is implemented through the log retrieval interface that accepts container ID parameters, enabling precise targeting of log sources.
Solution Approach 2:
The patent applies local quality by allowing different retrieval strategies for different containers based on their log generation characteristics. The system stores metadata about each container's log properties (generation rate, size, time range) and enables administrators to access logs with specific quality attributes (time duration, size limits) tailored to each container's characteristics.
2Ease of operation
If logs are stored in separate log files for each container, then log organization is improved, but log management complexity increases
Solution Approach 1:
The patent merges the management of multiple container logs into a unified log management system. Instead of requiring separate management mechanisms for each container's log files, the system provides a centralized interface that handles log retrieval across all containers through a single standardized API. The container identifier serves as a routing key that directs retrieval operations to the appropriate log files without requiring separate management logic.
Solution Approach 2:
The log management system implements universality by designing a single log retrieval interface that can handle multiple containers with different log characteristics. The system stores universal metadata structures that accommodate various container types and log generation patterns, allowing the same retrieval mechanism to efficiently access logs from any container regardless of its specific properties.
3Reliability
If log retrieval is enabled for previous application instances, then debugging capability is improved, but storage requirements increase
Solution Approach 1:
The system performs preliminary action by pre-storing metadata information about container logs including time ranges, sizes, and instance identifiers. This metadata is prepared and organized in advance, allowing the system to quickly determine which log files contain relevant information for debugging without needing to retrieve and examine actual log data from all previous instances. This preliminary organization enables efficient selection of only the necessary log portions.
Solution Approach 2:
The patent implements partial action by enabling administrators to retrieve only the specific portion of logs needed for debugging. Through the log retrieval interface, users can specify parameters such as time duration, log size limits, and instance identifiers, obtaining exactly the partial log data required rather than retrieving complete logs from all previous instances. This selective retrieval reduces storage requirements while maintaining debugging effectiveness.
Data Source
AI summary
Log information is retrieved from a log of a container running in a virtual machine in response to a request for the log information, by accessing a virtual disk of the virtual machine, reading the log of the container from the virtual disk and preparing the requested log information from the log, and transmitting the requested log information to a virtual machine (VM) management process running in a host computer of the virtual machine for the VM management process to forward to a requestor of the log information. Alternatively, log data of the container running in the virtual machine may be streamed to the VM management process over a virtual socket communication channel that is established between the virtual machine and the VM management process.


