Closed gudmundur closed 1 year ago
Hi @gudmundur! I think you just figured out what I was having trouble figuring out in https://github.com/hashicorp/nomad/issues/13538. The fix isn't immediately obvious, as that executor is also used by the exec
and java
drivers, so we'll need to make sure it's configured differently for those two cases, and we'll probably also want to provide better guidance to the exec
driver docs about how to open up to a larger set of devices when needed.
As of https://github.com/hashicorp/nomad/pull/18371 (Nomad 1.7) raw_exec
should no longer trigger the eBFP filtering for devices.
Nomad version
Output from
1.5.1
Operating system and Environment details
Linux with
cgroups v2
enabled.Issue
My expectation with
cgroups
enabled forraw_exec
is that it only managescgroups
for the task, and not provide any additional confinement. When we upgraded fromcgroups
v1
tov2
a little while back, we found that we had to useno_cgroups
as Nomad applies eBPF filtering on devices.Reproduction steps
Using
raw_exec
andno_cgroups = false
, try accessing any devices that are not allowed inspecconv.AllowedDevices
.Expected Result
Only
cgroups
applied, no device filtering or any confinement asraw_exec
implies.Actual Result
Permission denied error when attempting to access for example
/dev/mapper/<Device created by udev>
.