Prevent broken mount points from DQing nodes

For logs written to a file

tail -f /volume1/storj/v3/data/node.log | awk '/(ERROR|canceled|failed).*GET_AUDIT/ {system ("docker stop -t 300 storagenode")}'

For logs in docker

docker logs -f --tail 20 storagenode | awk '/(ERROR|canceled|failed).*GET_AUDIT/ {system ("docker stop -t 300 storagenode")}'

Please be aware I haven’t tested the docker version. But it should work.

This stops your node if it encounters a single audit failure, that might be overly aggressive as it would also kill your nodes for recoverable audit failures. This suggestion is just for educational purposes. Don’t use this. (Unless you know what you’re doing)

2 Likes