Merge branch 'master' of github.com:OPENNETWORKINGLAB/ONOS
diff --git a/cluster-mgmt/bin/func.sh b/cluster-mgmt/bin/func.sh
index 05c2adb..9785e66 100755
--- a/cluster-mgmt/bin/func.sh
+++ b/cluster-mgmt/bin/func.sh
@@ -83,6 +83,10 @@
       echo "Removing all data in db"
       dsh -w ${basename}1 "cd $ONOS_DIR; ./scripts/cleanup-cassandra.sh"
       ;;
+    checkdb)
+      echo "Check DB Status"
+      dsh -w ${basename}1 "cd $ONOS_DIR; ./scripts/check-db-status.sh"
+      ;;
     status)
       echo "Checking Cassandra Status"
       dsh -w ${basename}1 "cd $ONOS_DIR; ./start-cassandra.sh status"
diff --git a/cluster-mgmt/bin/start.sh b/cluster-mgmt/bin/start.sh
index dac6bb1..23fcde7 100755
--- a/cluster-mgmt/bin/start.sh
+++ b/cluster-mgmt/bin/start.sh
@@ -9,5 +9,11 @@
 zk start
 cassandra start
 cassandra cleandb
+db_status=`cassandra checkdb |grep OK | wc -l`
+if [ $db_status != 1 ];then
+  echo $db_status
+  echo "Cassandra DB was screwed up. Need DB key drop"
+  exit
+fi
 onos start
 dsh -g $basename 'cd ONOS; ./ctrl-local.sh'