Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: drop modprobe calls #2021

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions drivers/aufs/aufs.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"io"
"io/fs"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
Expand Down Expand Up @@ -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
}
Expand Down
6 changes: 0 additions & 6 deletions drivers/overlay/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down