aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/specgen/generate/oci.go7
-rw-r--r--test/e2e/config/containers.conf2
2 files changed, 8 insertions, 1 deletions
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index 7993777fb..c70141109 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -267,6 +267,13 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt
return nil, err
}
} else {
+ // add default devices from containers.conf
+ for _, device := range rtc.Containers.Devices {
+ if err := DevicesFromPath(&g, device); err != nil {
+ return nil, err
+ }
+ }
+ // add default devices specified by caller
for _, device := range s.Devices {
if err := DevicesFromPath(&g, device.Path); err != nil {
return nil, err
diff --git a/test/e2e/config/containers.conf b/test/e2e/config/containers.conf
index 55d18f5e8..a3bdde786 100644
--- a/test/e2e/config/containers.conf
+++ b/test/e2e/config/containers.conf
@@ -38,7 +38,7 @@ shm_size = "201k"
# If it is empty or commented out, only the default devices will be used
#
devices = [
- "/dev/zero:/dev/notone,rwm",
+ "/dev/zero:/dev/notone:rwm",
]
default_sysctls = [