VIDA-NYU / reprozip

ReproZip is a tool that simplifies the process of creating reproducible experiments from command-line executions, a frequently-used common denominator in computational science.
https://www.reprozip.org/
BSD 3-Clause "New" or "Revised" License
305 stars 34 forks source link

Elasticsearch doesn't work in chroots: requires / to be a mountpoint #235

Closed remram44 closed 3 years ago

remram44 commented 7 years ago

For somewhat arbitrary reason, Elasticsearch's file locking code does a bunch of sanity checks and will error out if / is not a mountpoint. This is not the case when running in a chroot.

While the correct fix is definitely for Elasticsearch to accept to run in chroots (elastic/elasticsearch#12018), there might be some possible workarounds in reprounzip-vagrant.

idreamerhx commented 5 years ago

still not work in chroot. What an arbitrary reason for a search engine.

Caused by: java.io.IOException: Mount point not found at sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:91) ~[?:?] at sun.nio.fs.UnixFileStore.(UnixFileStore.java:65) ~[?:?] at sun.nio.fs.LinuxFileStore.(LinuxFileStore.java:44) ~[?:?] at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51) ~[?:?] at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39) ~[?:?] at sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:368) ~[?:?] at java.nio.file.Files.getFileStore(Files.java:1461) ~[?:1.8.0_192] at org.elasticsearch.env.Environment.getFileStore(Environment.java:324) ~[elasticsearch-6.5.4.jar:6.5.4] at org.elasticsearch.env.NodeEnvironment$NodePath.(NodeEnvironment.java:108) ~[elasticsearch-6.5.4.jar:6.5.4] at org.elasticsearch.env.NodeEnvironment$NodeLock.(NodeEnvironment.java:209) ~[elasticsearch-6.5.4.jar:6.5.4] at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:267) ~[elasticsearch-6.5.4.jar:6.5.4] at org.elasticsearch.node.Node.(Node.java:296) ~[elasticsearch-6.5.4.jar:6.5.4] at org.elasticsearch.node.Node.(Node.java:265) ~[elasticsearch-6.5.4.jar:6.5.4] at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:212) ~[elasticsearch-6.5.4.jar:6.5.4] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.5.4.jar:6.5.4] at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.5.4.jar:6.5.4] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.5.4.jar:6.5.4]

mount --bind /your/chroot /your/chroot according to https://docs.docker.com/storage/bind-mounts/#start-a-container-with-a-bind-mount Start a container with a bind mount & /usr/bin/arch-chroot

remram44 commented 5 years ago

I don't think you can mount a directory over itself. The doc you linked is for Docker, not chroot.

I could make a fix for this in reprounzip-vagrant, but I don't feel so good adding something weird only for one application... Might be worth doing since Elasticsearch is so common, though...