gnu: docker: Use disjunct temp directories for probing.
* gnu/packages/patches/docker-use-fewer-modprobes.patch: Use disjunct temp directories for probing.
This commit is contained in:
parent
5e00dcc89e
commit
ceab612374
|
@ -51,7 +51,7 @@ See <https://github.com/moby/moby/pull/38930>.
|
||||||
- // proc/filesystems for when overlay is supported
|
- // proc/filesystems for when overlay is supported
|
||||||
- exec.Command("modprobe", "overlay").Run()
|
- exec.Command("modprobe", "overlay").Run()
|
||||||
+ // Access overlay filesystem so that Linux loads it (if possible).
|
+ // Access overlay filesystem so that Linux loads it (if possible).
|
||||||
+ mountTarget, err := ioutil.TempDir("", "supportsOverlay")
|
+ mountTarget, err := ioutil.TempDir("", "supportsOverlay2")
|
||||||
+ if err != nil {
|
+ if err != nil {
|
||||||
+ logrus.WithField("storage-driver", "overlay2").Error("Could not create temporary directory, so assuming that 'overlay' is not supported.")
|
+ logrus.WithField("storage-driver", "overlay2").Error("Could not create temporary directory, so assuming that 'overlay' is not supported.")
|
||||||
+ return graphdriver.ErrNotSupported
|
+ return graphdriver.ErrNotSupported
|
||||||
|
@ -71,7 +71,7 @@ See <https://github.com/moby/moby/pull/38930>.
|
||||||
|
|
||||||
- // Check if kernel supports xfs filesystem or not.
|
- // Check if kernel supports xfs filesystem or not.
|
||||||
- exec.Command("modprobe", "xfs").Run()
|
- exec.Command("modprobe", "xfs").Run()
|
||||||
+ mountTarget, err := ioutil.TempDir("", "supportsOverlay")
|
+ mountTarget, err := ioutil.TempDir("", "supportsXFS")
|
||||||
+ if err != nil {
|
+ if err != nil {
|
||||||
+ return errors.Wrapf(err, "error checking for xfs support")
|
+ return errors.Wrapf(err, "error checking for xfs support")
|
||||||
+ } else {
|
+ } else {
|
||||||
|
|
Loading…
Reference in New Issue