Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Cassandra on Openshift

I'm new to Cassandra, and trying to get it going on OpenShift, 3.7 Origin.

I'm starting with a base image from DTR, cassandra:3. My Dockerfile is simply: FROM cassandra:3. During the oc new-app command my cassandra pod goes into a crash loop, the only log message that shows up is Running Cassandra as root user or group is not recommended - please start Cassandra using a different system user. If you really want to force running Cassandra as root, use -R command line option. I'm not able to run as root from OSE anyway, so I'm not trying to force it.

What doesn't make sense is the Dockerfile and deploy-entrypoint.sh don't appear to be running root. (And why would cassandra default to something it doesn't recommend?) I'm happy to extend the Dockerfile as needed to fix this error, but nothing I've tried has worked.

Does anyone know what I missed?

like image 482
lostphilosopher Avatar asked Dec 18 '25 15:12

lostphilosopher


1 Answers

That image appears to expect to be started as root and then use gosu to change to the cassandra user, or be run with uid fixed to that matching the cassandra account created.

Under OpenShift with default security model, it will be forced to run as arbitrary user ID, which this image likely doesn't support.

If you have admin access, you could override security for the deployment to specify that it run as the uid for the cassandra account, then it may work.

like image 106
Graham Dumpleton Avatar answered Dec 20 '25 07:12

Graham Dumpleton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!