Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide dynamic configuration file to Cassandra cluster #1

Closed
PXMYH opened this issue Oct 20, 2018 · 2 comments
Closed

Provide dynamic configuration file to Cassandra cluster #1

PXMYH opened this issue Oct 20, 2018 · 2 comments
Assignees

Comments

@PXMYH
Copy link
Owner

PXMYH commented Oct 20, 2018

Intent is to use docker config create to create a docker configuration and provide it to Cassandra cluster running in Docker Swarm. Steps as follows:

docker config create cassandra.yaml ./res/cassandra.yaml
docker service create --replicas 1 --name cassandra_cluster --config source=cassandra.yaml,target=/etc/cassandra/cassandra.yaml,mode=644 -d cassandra:3.11.3

However, after feeding config to cluster, getting error:

[atlantis@kali cassandra]$ docker service logs cassandra_cluster
cassandra_cluster.1.scgjmt4g17kk@kali    | chown: changing ownership of '/etc/cassandra/cassandra.yaml': Read-only file system
cassandra_cluster.1.nr7entee1ahm@kali    | chown: changing ownership of '/etc/cassandra/cassandra.yaml': Read-only file system
cassandra_cluster.1.w1h0b6lwfd0s@kali    | chown: changing ownership of '/etc/cassandra/cassandra.yaml': Read-only file system
cassandra_cluster.1.qgjzujcwsokz@kali    | chown: changing ownership of '/etc/cassandra/cassandra.yaml': Read-only file system
[atlantis@kali cassandra]$ 

Reason being Cassandra locked permission to read only and docker config can't overwrite the file.

Possible solution:
instruct Cassandra instead of looking for config in default location /etc/cassandra, it can find config under /cassandra.yaml which is default docker config loading behavior

@PXMYH PXMYH self-assigned this Oct 20, 2018
@PXMYH
Copy link
Owner Author

PXMYH commented Oct 20, 2018

some Github issues:
kelseyhightower/consul-on-kubernetes#28
coreos/bugs#2384

@PXMYH
Copy link
Owner Author

PXMYH commented Oct 20, 2018

--privileged=true maybe?

@PXMYH PXMYH closed this as completed Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant