Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1455 from 6WIND/master
Browse files Browse the repository at this point in the history
fix incomplete host device for PrivilegedWithoutHostDevices
  • Loading branch information
mikebrow authored Apr 27, 2020
2 parents 197dca5 + 98f8ec4 commit 4ea4ca9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/server/container_create_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ func (c *criService) containerSpec(id string, sandboxID string, sandboxPid uint3
specOpts = append(specOpts, oci.WithPrivileged)
if !ociRuntime.PrivilegedWithoutHostDevices {
specOpts = append(specOpts, oci.WithHostDevices, oci.WithAllDevicesAllowed)
} else {
// add requested devices by the config as host devices are not automatically added
specOpts = append(specOpts, customopts.WithDevices(c.os, config), customopts.WithCapabilities(securityContext))
}
} else { // not privileged
specOpts = append(specOpts, customopts.WithDevices(c.os, config), customopts.WithCapabilities(securityContext))
Expand Down

0 comments on commit 4ea4ca9

Please # to comment.