Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
610a2d13
Commit
610a2d13
authored
6 years ago
by
Mahmood Ali
Browse files
Options
Download
Email Patches
Plain Diff
Use mounts in example device
parent
5cd339d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/device/cmd/example/device.go
+4
-4
plugins/device/cmd/example/device.go
with
4 additions
and
4 deletions
+4
-4
plugins/device/cmd/example/device.go
+
4
-
4
View file @
610a2d13
...
...
@@ -265,10 +265,10 @@ func (d *FsDevice) Reserve(deviceIDs []string) (*device.ContainerReservation, er
}
// Add a mount
resp
.
Device
s
=
append
(
resp
.
Device
s
,
&
device
.
DeviceSpec
{
TaskPath
:
fmt
.
Sprintf
(
"/
dev
/%s"
,
id
),
HostPath
:
filepath
.
Join
(
d
.
deviceDir
,
id
),
CgroupPerms
:
"rw"
,
resp
.
Mount
s
=
append
(
resp
.
Mount
s
,
&
device
.
Mount
{
TaskPath
:
fmt
.
Sprintf
(
"/
tmp/device-mounts
/%s"
,
id
),
HostPath
:
filepath
.
Join
(
d
.
deviceDir
,
id
),
ReadOnly
:
false
,
})
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment