intel / cc-oci-runtime

OCI (Open Containers Initiative) compatible runtime for Intel® Architecture
GNU General Public License v2.0
417 stars 59 forks source link

Error in arangodb image #320

Open GabyCT opened 8 years ago

GabyCT commented 8 years ago

It is not possible to start an arangodb instance. Using the arangodb image from docker hub (docker pull arangodb/arangodb)

docker run -ti --name containertest -e ARANGO_ROOT_PASSWORD=secretword -e ARANGO_NO_AUTH=1 -p 8529:8529 arangodb/arangodb

It is showing the following error Initializing database...Hang on... cannot memory map file '/var/lib/arangodb3/journals/logfile-13.db': 'system error' The database directory might reside on a shared folder (VirtualBox, VMWare) or an NFS mounted volume which does not allow memory mapped files. unable to create logfile '/var/lib/arangodb3/journals/logfile-13.db': system error unable to create logfile: system error unable to create new WAL reserve logfile: system error

jcvenegas commented 8 years ago

Seems that is an issue related to 9p shared rootfs adding label for 9p

grahamwhaley commented 8 years ago

I agree, it is almost definitely due to use of 9p. I don't think it is a bug with 9p though, just a feature (as implied in the error message), that 9p cannot do memory mapped files (we should verify that is true). If we look at the arangodb hub page (https://hub.docker.com/_/arangodb/), in the 'Persistant data' section, then we can see that 'normally' the directory in question could/would be mapped as a docker volume - so we should try that test as well - if that still fails then we really do have an issue :-) Nice find btw.

GabyCT commented 8 years ago

I put a volume to the container docker run -ti --name containertest -e ARANGO_ROOT_PASSRD=secretword -e ARANGO_NO_AUTH=1 -p 8529:8529 -v /tmp/arangodb:/var/lib/arangodb3 arangodb However, the error is still there cannot memory map file '/var/lib/arangodb3/journals/logfile-5.db': 'system error' The database directory might reside on a shared folder (VirtualBox, VMWare) or an NFS mounted volume which does not allow memory mapped files. unable to create logfile '/var/lib/arangodb3/journals/logfile-5.db': system error unable to create logfile: system error unable to create new WAL reserve logfile: system error

GabyCT commented 8 years ago

Tested using CC 2.1 and the error is still there

grahamwhaley commented 7 years ago

A quick update. It was mentioned in a call that this might be an 'ENV' issue and that we fixed that - I re-tested, and it still fails with my code (v2.1.6). Looking again at the errors from arrango, I'm fairly sure this might be a 9pfs related mmap issue. Looking briefly at the kernel 9p code, there is a lot of mmap code in there, but it is not clear to me if this is host or client side, and it looks like there are a number of permutations in the code (around types of caching etc.): https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/9p/vfs_file.c#n631 So, to get to the bottom of this I believe will take a bunch of kernel digging and diagnostics around the 9pfs calls, and what actually fails.

rarindam commented 7 years ago

Hi @GabyCT , Please have a look at https://github.com/01org/cc-oci-runtime/issues/949, where a root cause for mmap issues in 9p. Please use: mount -t 9p -o trans=virtio test_mount /tmp/shared/ -oversion=9p2000.L,posixacl,cache=fscache cache=fscache enables writeable mmaps to be allowed. Please let me know if this fixes the issue for you