Merge pull request #2021 from giuseppe/drop-modprobe
drivers: drop modprobe calls
This commit is contained in:
commit
ab74785ce9
|
|
@ -30,7 +30,6 @@ import (
|
|||
"io"
|
||||
"io/fs"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
|
@ -183,15 +182,7 @@ func Init(home string, options graphdriver.Options) (graphdriver.Driver, error)
|
|||
}
|
||||
|
||||
// Return a nil error if the kernel supports aufs
|
||||
// We cannot modprobe because inside dind modprobe fails
|
||||
// to run
|
||||
func supportsAufs() error {
|
||||
// We can try to modprobe aufs first before looking at
|
||||
// proc/filesystems for when aufs is supported
|
||||
if err := exec.Command("modprobe", "aufs").Run(); err != nil {
|
||||
logrus.Warnf("Execution of `modprobe aufs` ended with error: %v", err)
|
||||
}
|
||||
|
||||
if unshare.IsRootless() {
|
||||
return ErrAufsNested
|
||||
}
|
||||
|
|
|
|||
|
|
@ -688,14 +688,8 @@ func SupportsNativeOverlay(home, runhome string) (bool, error) {
|
|||
}
|
||||
|
||||
func supportsOverlay(home string, homeMagic graphdriver.FsMagic, rootUID, rootGID int) (supportsDType bool, err error) {
|
||||
// We can try to modprobe overlay first
|
||||
|
||||
selinuxLabelTest := selinux.PrivContainerMountLabel()
|
||||
|
||||
if err := exec.Command("modprobe", "overlay").Run(); err != nil {
|
||||
logrus.Warnf("Execution of `modprobe overlay` ended with error: %v", err)
|
||||
}
|
||||
|
||||
logLevel := logrus.ErrorLevel
|
||||
if unshare.IsRootless() {
|
||||
logLevel = logrus.DebugLevel
|
||||
|
|
|
|||
Loading…
Reference in New Issue