Skip to content
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

Closed
sboeuf opened this issue Apr 2, 2018 · 1 comment
Closed
Labels
enhancement Improvement to an existing feature needs-help Request for extra help (technical, resource, etc)

Comments

@sboeuf
Copy link

sboeuf commented Apr 2, 2018

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).

bergwolf added a commit to bergwolf/kata-runtime that referenced this issue Apr 7, 2018
To include the grpc yamux dialer.

Included kata agent git shortlog:
Archana Shinde (1):
      mount: Correct error message with mount failure.

Eric Ernst (2):
      Merge pull request kata-containers#196 from sboeuf/fix_rollback
      Merge pull request kata-containers#201 from bergwolf/yamux_client

Graham whaley (1):
      ci: lib: allow override of tests_repo

James O. D. Hunt (16):
      mount: Log params and validate
      device: Add validation and debug
      tests: Move helper function
      tests: Use root skip function
      tests: Skip more tests if non-root
      CI: Require pullapprove ack for protocol changes
      agent: Add announce function
      announce: Add standard fields when running as PID 1
      announce: Add device and storage handlers
      announce: Add total memory
      Merge pull request kata-containers#180 from jodh-intel/add-announce-log-call
      github: Add issue template
      Merge pull request kata-containers#189 from grahamwhaley/20180322_tests_repo
      Merge pull request kata-containers#187 from jodh-intel/github-issue-template
      Merge pull request kata-containers#192 from sboeuf/fix_device
      Merge pull request kata-containers#197 from amshinde/correct-err-msg

Lai Jiangshan (1):
      Merge pull request kata-containers#176 from jodh-intel/pullapprove-for-grpc-changes

Peng Tao (3):
      Merge pull request kata-containers#171 from jodh-intel/validate-mount-params
      Merge pull request kata-containers#206 from sboeuf/fix_rollback
      protocol: client: enable builtin yamux client support

Sebastien Boeuf (7):
      Merge pull request kata-containers#178 from jodh-intel/skip-more-tests-if-not-root
      Merge pull request kata-containers#173 from jodh-intel/add-device-debug
      device: VmPath can be empty if an Id is provided
      agent: Rollback properly when container creation fails
      vendor: Update libcontainer vendoring
      Merge pull request kata-containers#203 from sboeuf/revendor_libcontainer
      agent: Fix container creation rollback

Signed-off-by: Peng Tao <[email protected]>
zklei pushed a commit to zklei/runtime that referenced this issue Jun 13, 2019
@devimc
Copy link

devimc commented Jul 17, 2019

@WeiZhang555 I think you fixed this, right?

@devimc devimc added enhancement Improvement to an existing feature needs-help Request for extra help (technical, resource, etc) labels Jul 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement to an existing feature needs-help Request for extra help (technical, resource, etc)
Projects
None yet
Development

No branches or pull requests

3 participants