> Note this script doesn't work if your repair takes hours, and in the > middle of the repair cassandra was restarted, nodetool will exit and the > flagfile will be updated. Another case, if repair hangs, and day later > cassandra is restarted.
This is why "set -e" is at the to and commented as "important" :) But it relies on 'nodetool repair' reliably exiting with non-zero exit status on failures. > if nodetool returns an error this might work: > > nodetool -h localhost repair && touch /path/to/flagfile.tmp That's the equivalent, due to 'set -e'. -- / Peter Schuller