aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/test/bin/onos-remove-raft-logs
blob: 1f1e5c680a7bfd8231e16844cb75cf43b2d7bb68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
# -----------------------------------------------------------------------------
# Removes Raft logs on all instances
# -----------------------------------------------------------------------------

[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults

nodes=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2)

onos-service --cell stop

# TODO: use $KARAF_DATA
for node in $nodes; do onos-ssh $node "rm -v -- $ONOS_INSTALL_DIR/$KARAF_DIST/data/raft/onos-copy-cat-log_*"; done