runtime icon indicating copy to clipboard operation
runtime copied to clipboard

no able to perform a dnf update in a fedora container

Open GabyCT opened this issue 7 years ago • 6 comments

It is not possible to do an update in a fedora container docker run -td --name test fedora sh

docker exec test sh -c "dnf -y update" BDB0126 mmap: Invalid argument

Configurations: cc-runtime : 3.0.10 commit : 3d402d1 OCI specs: 1.0.0-dev Docker 1.17.09

GabyCT avatar Dec 18 '17 22:12 GabyCT

I suspect this is the mmap issue that is iirc related to 9p. Can you check if the current '9p tmpfs' workaround fixes it? Hmm, that is if dnf honours TMPDIR and the like. So, inside the container set export TMPDIR=/dev/shm to point at a ramfs fs, and then try again. Failing that - an strace of the failing dnf could help further diagnosis.

grahamwhaley avatar Dec 19 '17 09:12 grahamwhaley

This does indeed look like the old :chestnut: https://github.com/01org/cc-oci-runtime/issues/669.

jodh-intel avatar Dec 19 '17 12:12 jodh-intel

(See https://github.com/01org/cc-oci-runtime/issues/669#issuecomment-281280979 for the ramfs workaround).

jodh-intel avatar Dec 19 '17 12:12 jodh-intel

this issue was fixed in qemu 2.10 (last time I tested) :)

devimc avatar Dec 19 '17 14:12 devimc

@jodh-intel - that 'old' fix will no longer work as we have tightened the privs in the CC containers, so you cannot do the mount from inside the container any more :-) The 'new' fix (workaround) is to try and point the apps to use an existing tmpfs in the container for their tmp space:

export TMPDIR=/dev/shm; <your command here>

@devimc - so, that begs the question - do you know when that will land into a version of CC ?

grahamwhaley avatar Dec 20 '17 10:12 grahamwhaley

Hi @grahamwhaley - I think this should be captured atleast in the wiki, but ideally in https://github.com/clearcontainers/runtime/blob/master/docs/limitations.md.

jodh-intel avatar Dec 20 '17 12:12 jodh-intel