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

Correct permissions on cassandra run script #19114

Merged
merged 1 commit into from
Jan 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/cassandra/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ COPY logback.xml /etc/cassandra/logback.xml
COPY run.sh /run.sh
COPY kubernetes-cassandra.jar /kubernetes-cassandra.jar

RUN chmod a+x /run.sh && \
RUN chmod a+rx /run.sh && \
mkdir -p /cassandra_data/data && \
chown -R cassandra.cassandra /etc/cassandra /cassandra_data && \
chmod o+w -R /etc/cassandra /cassandra_data
Expand Down
14 changes: 9 additions & 5 deletions examples/cassandra/image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ VERSION=v7

all: build

# TODO: build the jar and copy it in
build:
docker build -t gcr.io/google_containers/cassandra:${VERSION} .
kubernetes-cassandra.jar: ../java/* ../java/src/io/k8s/cassandra/*.java
cd ../java && mvn package
mv ../java/target/kubernetes-cassandra*.jar kubernetes-cassandra.jar
cd ../java && mvn clean

build: kubernetes-cassandra.jar
docker build -t gcr.io/google_containers/cassandra:${VERSION} .

push: build
gcloud docker push gcr.io/google_containers/cassandra:${VERSION}
gcloud docker push gcr.io/google_containers/cassandra:${VERSION}

.PHONY: all
.PHONY: all build push
Binary file modified examples/cassandra/image/kubernetes-cassandra.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ public List<InetAddress> getSeeds() {
// Here is a problem point, endpoints.subsets can be null in first node cases.
if (endpoints.subsets != null && !endpoints.subsets.isEmpty()){
for (Subset subset : endpoints.subsets) {
for (Address address : subset.addresses) {
list.add(InetAddress.getByName(address.ip));
if (subset.addresses != null && !subset.addresses.isEmpty()) {
for (Address address : subset.addresses) {
list.add(InetAddress.getByName(address.ip));
}
}
}
}
Expand Down