Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • lava lava
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 65
    • Merge requests 65
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • lava
  • lavalava
  • Merge requests
  • !1841

Open
Created Oct 12, 2022 by Larry Shen@atlineContributor
  • Report abuse
Report abuse

udev: unshare device from container.

  • Overview 6
  • Commits 6
  • Pipelines 5
  • Changes 9

Close #437

As mentioned before, without unshare device from container may result in some adb device be wrong exist in other container, especially when we do parallel device test on same worker.

For years, we used next to workaround this issue in local:

f"mkdir -p {nodedir} && rm -f {nodedir}/* && mknod {node} {nodetype} {major} {minor} && chown {uid}:{gid} {node} && chmod {mode} {node}",

But gruffly delete all old usb bus when udev share breaks now, as recently we have a test scenario which need to operate a usb recorder in docker-test-shell container.

So, we propose this patch to fix this issue completely.

The idea is: We can't get --serial-number when get udev "remove", but we could get devpath. So when share device to container, we could also record a map between devpath and container name, then when unshare device, we could use devpath to know from which container we should delete that usb device.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: docker_unshare_device