From b3d4898d9e8452ea0b8d848c048e712d43b8d9a3 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 11 Jun 2017 14:22:02 +0300 Subject: [SDC-29] rebase continue work to align source Change-Id: I218f1c5ee23fb2c8314f1c70921d3ad8682c10f4 Signed-off-by: Michael Lando --- .../files/default/titan.properties | 6 ----- .../templates/default/create_dox_keyspace.sh.erb | 28 ++++------------------ 2 files changed, 5 insertions(+), 29 deletions(-) delete mode 100644 sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/titan.properties (limited to 'sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions') diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/titan.properties b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/titan.properties deleted file mode 100644 index 43944eae47..0000000000 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/titan.properties +++ /dev/null @@ -1,6 +0,0 @@ -storage.backend=cassandra -storage.hostname=localhost -storage.port=9160 -storage.username=asdc_user -storage.password=Aa1234%^! -storage.cassandra.keyspace=sdctitan \ No newline at end of file diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb index da6bbb184c..f65bb945f3 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb @@ -12,41 +12,23 @@ echo -e "$KEYSPACE\n$KEYSPACE1" > /tmp/create_dox_keyspace.cql chmod 755 /tmp/create_dox_keyspace.cql cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS -f /tmp/create_dox_keyspace.cql > /dev/null 2>&1 -CS_VERSION=`cassandra -v` -CS_MAJOR_VERSION=`cassandra -v | cut -c1` -if [ ${CS_MAJOR_VERSION} -gt 2 ]; then - echo "`date` --- CS [${CS_VERSION}] uses system_schema.keyspaces" - res=`echo "select keyspace_name from system_schema.keyspaces ;" | cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS |grep -c dox 2>/dev/null` -else - echo "`date` --- CS [${CS_VERSION}] uses system.schema_keyspaces" - res=`echo "select keyspace_name from system.schema_keyspaces ;" | cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS |grep -c dox 2>/dev/null` -fi + +res=`echo "select keyspace_name from system.schema_keyspaces ;" | cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS |grep -c dox 2>/dev/null` if [ $res -gt 0 ]; then - echo "`date` --- dox keyspace was created " + echo "`date` --- dox keyspace was created " else - echo "`date` --- Failed to create dox keyspace" + echo "`date` --- Failed to create dox keyspace" fi echo "run create_dox_db.cql" chmod 755 /tmp/create_dox_db.cql cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS -f /tmp/create_dox_db.cql > /dev/null 2>&1 -$res=$? -if [ $res -gt 0 ]; then - echo "`date` --- dox keyspace: create_dox_db.cql failed ! " -else - echo "`date` --- dox keyspace: create_dox_db.cql completed successfully " -fi sleep 10 echo "run alter_dox_db.cql" chmod 755 /tmp/alter_dox_db.cql cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS -f /tmp/alter_dox_db.cql > /dev/null 2>&1 -$res=$? -if [ $res -gt 0 ]; then - echo "`date` --- dox keyspace: alter_dox_db.cql failed !" -else - echo "`date` --- dox keyspace: alter_dox_db.cql completed successfully " -fi + -- cgit 1.2.3-korg