summaryrefslogtreecommitdiffstats
path: root/auth/auth-cass/cass_init/push.sh
diff options
context:
space:
mode:
authorroot <kranthi.guttikonda@att.com>2019-02-25 17:23:37 -0500
committerroot <kranthi.guttikonda@att.com>2019-02-25 17:23:37 -0500
commit40fad64132a671731e37ce97911a03db72ff7ecf (patch)
treec059cca09084c8d12cb630ba012382a0e42fa20b /auth/auth-cass/cass_init/push.sh
parentc9324c82b4a7d6e2867b2e765f4949ee306045af (diff)
Fix: AAF timing issues
We wait until the cassandra DB comes up and listen on TCP 9042 before running any cqlsh commands. Also we increse cqlsh --request-timeout to 60 seconds and in order to prevent coordinator write timeouts we increase write_request_ timeout_in_ms to 20 seconds. So that Cassandra DB comes up in all different setpups without any failures. Change-Id: Idf2e1080a0ec39d6a594888f13625ef173aa5467 Issue-ID: AAF-773 Signed-off-by: kranthi.guttikonda@att.com Signed-off-by: root <kranthi.guttikonda@att.com>
Diffstat (limited to 'auth/auth-cass/cass_init/push.sh')
-rw-r--r--auth/auth-cass/cass_init/push.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/auth/auth-cass/cass_init/push.sh b/auth/auth-cass/cass_init/push.sh
index 9d59bd0f..f3e5d80d 100644
--- a/auth/auth-cass/cass_init/push.sh
+++ b/auth/auth-cass/cass_init/push.sh
@@ -35,7 +35,11 @@ fi
cd dats
for T in $(ls *.dat); do
if [ -s $T ]; then
- cqlsh -e "COPY authz.${T/.dat/} FROM '$T' WITH DELIMITER='|';"
+ until cqlsh --request-timeout=60 -e "COPY authz.${T/.dat/} FROM '$T' WITH DELIMITER='|';";
+ do
+ echo "Unexpected failure...sleep for 10 seconds and try again"
+ sleep 10
+ done
fi
done
cd $DIR