This repository has been archived by the owner on May 12, 2021. It is now read-only.
Share the same host device from the host through several containers #171
Labels
enhancement
Improvement to an existing feature
needs-help
Request for extra help (technical, resource, etc)
Let's say we have a container A relying on the device
/dev/loop0
from the host. This device will be hotplugged into the VM and used by the agent.Now, we need a container B to run on the same pod to access the same device. The way it works today, we will duplicate the hotplugging of the same device and it will appear as a different one inside the agent. This also means that a modification on the device from the container A is not reported to the device seen by container B.
The way to properly handle this would be to hold a list of the host devices already passed through the VM and what is their address on the host. This would prevent virtcontainers code from hotplugging a new device, but instead, the agent would know which device needs to be mounted into the container B.
This would be the clean way to share a device between several containers inside the same pod (VM).
The text was updated successfully, but these errors were encountered: