cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

Crash using cockroachDB 2.1.6 and GlusterFS 5.4

Open chminngi opened this issue 7 years ago • 12 comments

What happened? A cluster consisting of four secure nodes crashed on two nodes.

What did you expect to happen? No problems running as docker containers on top of a glusterFS 5.4 shared storage

System: docker 18.09.3 Ubuntu 18.04 glusterFS 5.4 2x4 (distributed and replicated)

node 1:

* ERROR: cockroach server exited with error: failed to create engines: could not open rocksdb instance: IO error: While opening a file for sequentially reading: /cockroach/data/crdbalpsp1220/000038.log: Permission denied

node 2:

* ERROR: cockroach server exited with error: failed to create engines: could not open rocksdb instance: IO error: While opening a file for sequentially reading: /cockroach/data/crdbalpsp1290/000041.log: Permission denied

chminngi avatar Mar 14 '19 06:03 chminngi

The message is rather explanatory, don't you think? What are the file properties (owner, permissions) and which user are you running the cockroach process under?

@tim-o please qualify further

knz avatar Mar 14 '19 09:03 knz

@giminni - I'd recommend checking privileges on the log files specified. As @knz noted, these issues are almost always encountered when the user trying to start the process does not have permissions to access the store specified.

tim-o avatar Mar 14 '19 13:03 tim-o

It looks quite obvious, but I guess is a side effect, I moved the store out of the glusterFS volume to a local store. I guess the problem is located between glusterFS latency writing files.

My environment is getting some weird messages like incorrect checksum, cockroach.log symlink not found.

I compiled cockroach on arm64 latest version (2.1.6) running inside docker (18.09.3) using the same user and group id internal and on glusterFS storage side. Even the user that runs cockroach is the same internally and externally.

chminngi avatar Mar 14 '19 16:03 chminngi

Wait do you remember that ARM builds are not supported right?

knz avatar Mar 14 '19 17:03 knz

I know this, btw the error occures after a couple of hours, the file is not damaged and has the same uid gid as the cockroach process owner inside and outside docker, just for your records.

I guess the root cause of this problem is putting the store on glusterFS. Is there any recommendation what parameter I should set to work on shared storage system like glusterFS?

chminngi avatar Mar 16 '19 08:03 chminngi

Hey @giminni

Apologies for not getting back to you sooner, hope all is well. In regards to the issue, what flags are you using when starting your Docker container? We want to clarify whether or not the containers are on the glusterFS volume, or if there is some kind of persistent volume configuration pointing to the glusterFS from within the container. Let me know, and if you have any other questions as well, feel free to contact me.

Cheers, Ricardo

ricardocrdb avatar Jun 06 '19 17:06 ricardocrdb

I used to see errors like this often when people backed up RocksDB to gluster. Usually the affected file had zero permissions (i.e., all read/write/executable bits were reset). I forget the exact details about how such files come into existence, but it was related to file renames during a split-brain event.

I know you mentioned the file is not damaged and listed some of the metadata that is correct, but do you mind also confirming the permission bits are properly set on the file on glusterFS?

ajkr avatar Jun 06 '19 18:06 ajkr

Hey @giminni

Can you provide the permission bits on the file on glusterFS?

ricardocrdb avatar Jun 25 '19 19:06 ricardocrdb

Hey @giminni

Do you have an update on this issue? Let me know.

Cheers, Ricardo

ricardocrdb avatar Jul 01 '19 13:07 ricardocrdb

Hi @ricardocrdb,

after installing crDB outside glusterFS I could run the crDB cluster without any errors. Have migrated to glusterFS 6.1 and no plan when to test it again with crCB.

chminngi avatar Jul 01 '19 20:07 chminngi

Hey @giminni

Sounds good, shall we go ahead and close this issue? You can always respond back to this issue in case something else happens when you do test.

Cheers, Ricardo

ricardocrdb avatar Jul 02 '19 15:07 ricardocrdb

Closing due to inactivity. If you are still having the issue, please feel free to respond to this thread. We want to help!

ricardocrdb avatar Jul 08 '19 14:07 ricardocrdb