Input/output processing of container application data by module addition
Disclosed embodiments pertain to support input/output modules for container volumes. An input/output (I/O) request can be received from a containerized application. A container volume targeted by the I/O request can be identified. A determination is then made that the container volume is associated with one or more I/O modules based on a stored mapping of container volumes to I/O modules. Data associated with the I/O request is sent to the one or more I/O modules for processing. Processed data can be received from the one or more I/O modules, and the I/O request is fulfilled using the processed data. In certain embodiments, a write I/O request is fulfilled by writing the processed data to a virtual disk file for the container volume, and a read I/O request is fulfilled by returning the original data after reversing the processing to the containerized application.
1 . A method, comprising:
executing, on a hardware platform of a host, a hypervisor that abstracts physical resources of the host into one or more virtual machines;
running, in a virtual machine (VM), a container engine that manages one or more containerized applications;
receiving, at a container agent running in the VM, an input/output (I/O) request from a containerized application, wherein the container agent comprises a module table comprising, for a plurality of I/O modules, a mapping between each I/O module and a respective interface for the I/O module;
identifying a container volume targeted by the I/O request;
determining, by a container driver running as part of the hypervisor, that the container volume is associated with one or more I/O modules based on a stored mapping of container volumes to I/O modules;
communicating, by the container driver, identities of the one or more I/O modules to the container agent;
identifying, by the container agent, one or more interfaces mapped to one or more I/O modules;
calling, by the container agent, the one or more interfaces to send data associated with the I/O request to the one or more I/O modules for processing;
receiving processed data from the one or more I/O modules; and
fulfilling the I/O request using the processed data.
2 . The method of claim 1 , wherein fulfilling the I/O request using the processed data comprises writing the processed data to the container volume, wherein the I/O request is a write I/O request.
3 . The method of claim 1 , wherein fulfilling the I/O request using the processed data comprises returning the processed data to the containerized application, wherein the I/O request is a read I/O request.
4 . The method of claim 1 , wherein determining that the container volume is associated with one or more I/O modules comprises determining the container volume is associated with two or more I/O modules and a specified order of the two or more I/O modules from the stored mapping.
5 . The method of claim 4 , wherein sending the data associated with the I/O request to the one or more modules for processing comprises sending the data associated with the I/O request to the two or more I/O modules for processing in the specified order.
6 . The method of claim 1 , wherein communicating identities of the one or more I/O modules comprises sending an uplink call to the container agent including the identities of the one or more I/O modules.
7 . The method of claim 1 , further comprising:
sending the I/O request without data to two or more I/O modules for processing in a first order, wherein the processing updates a header of the I/O request to direct the I/O request to a block address based on processing logic of the two or more I/O modules; and
retrieving the data from the block address.
8 . The method of claim 7 , wherein sending the data associated with the I/O request to the one or more I/O modules for processing comprises sending the data to the two or more I/O modules for processing in a second order, wherein the second order is the first order reversed.
9 . The method of claim 1 wherein the one or more I/O modules perform one or more of encryption, compression, or formatting.
10 . A system, comprising:
one or more processors;
at least one memory coupled to the one or more processors that stores instructions that, when executed by the one or more processors, cause the one or more processors to:
execute, on a hardware platform of a host, a hypervisor that abstracts physical resources of the host into one or more virtual machines;
run, in a virtual machine (VM), a container engine that manages one or more containerized applications;
identify a container volume targeted by a received input/output (I/O) request from a containerized application;
determine, by the container driver running as part of the hypervisor, that the container volume is associated with one or more I/O modules based on a stored mapping of container volumes to I/O modules;
communicate, by the container driver, identities of the one or more I/O modules to the container agent;
identify, by the container agent, one or more interfaces mapped to one or more I/O modules;
call, by the container agent, the one or more interfaces to send data associated with the I/O request to the one or more I/O modules for processing; and
fulfill the I/O request using processed data received from the one or more I/O modules.
11 . The system of claim 10 , wherein the instructions further cause the one or more processors to write the processed data to a virtual disk file for the container volume to fulfill the I/O request, wherein the I/O request is a read I/O request.
12 . The system of claim 10 , wherein the instructions further cause the one or more processors to return the processed data to the containerized application to fulfill the I/O request, wherein the I/O request is a read I/O request.
13 . The system of claim 10 , wherein the instructions that cause the one or more processors to determine that the container volume is associated with one or more I/O modules cause the one or more processors to determine the container volume is associated with two or more I/O modules and an order of the two or more I/O modules from the stored mapping.
14 . The system of claim 13 , wherein the instructions that cause the one or more processors to send the data associated with the I/O request to the one or more modules for processing cause the one or more processors to send the data associated with the I/O request to the two or more I/O modules for processing in the order.
15 . The system of claim 10 , wherein communicating identities of the one or more I/O modules comprises sending an uplink call to the container agent including the one or more I/O modules.
16 . A non-transitory computer-readable medium comprising instructions that, when executed by one or more processors of a computing system, cause the computing system to perform operations, the operations comprising:
executing, on a hardware platform of a host, a hypervisor that abstracts physical resources of the host into one or more virtual machines;
running, in a virtual machine (VM), a container engine that manages one or more containerized applications;
receiving, at a container agent running in the VM, an input/output (I/O) request from a containerized application, wherein the container agent comprises a module table comprising, for a plurality of I/O modules, a mapping between each I/O module and a respective interface for the I/O module;
identifying a container volume targeted by the I/O request;
determining, by the container driver running as part of the hypervisor, that the container volume is associated with one or more I/O modules based on a stored mapping of container volumes to I/O modules;
communicating, by the container driver, identities of the one or more I/O modules to the container agent;
identifying, by the container agent, one or more interfaces mapped to one or more I/O modules;
calling, by the container agent, the one or more interfaces to send data associated with the I/O request to the one or more I/O modules for processing;
receiving processed data from the one or more I/O modules; and
fulfilling the I/O request using the processed data.
17 . The non-transitory computer-readable medium of claim 16 , wherein fulfilling the I/O request using the processed data received from the one or more I/O modules comprises fulfilling a write I/O request by writing the processed data to a virtual disk file for the container volume.
18 . The non-transitory computer-readable medium of claim 16 , wherein fulfilling the I/O request using the processed data received from the one or more I/O modules comprises fulfilling a read I/O request by returning the processed data to the containerized application.
19 . The non-transitory computer-readable medium of claim 16 , wherein determining that the container volume is associated with one or more I/O modules comprises determining the container volume is associated with two or more I/O modules and a specified order of the two or more I/O modules from the stored mapping.
20 . The non-transitory computer-readable medium of claim 19 , wherein sending the data associated with the I/O request to the one or more modules for processing comprises sending the data associated with the I/O request to the two or more I/O modules for processing in the specified order.