Closed dmeetryk closed 3 months ago
Pattern used in the script to select "node-IP-section" (grep -A1 "$IP") allows false positives if searched IP is a sub-string of another node IPs. As result the script fails. E.g. (in our setup):
grep -A1 "$IP"
$ IP=$(hostname -i) && nodetool gossipinfo | grep -A1 "$IP" /10.3.80.6 generation:1583954108 #... -- /10.3.80.69 generation:1583957204 #...
We did proceed with upgrade after modification, but would it be possible to change it to something like grep -A1 "^/${IP}$"?
grep -A1 "^/${IP}$"
BTW, existing PR modifying patterns in this script has the same issue only in awk pattern.
@dmeetryk hello, is this still relevant in the scope of merged https://github.com/scylladb/scylla-code-samples/pull/151 ? if not, we can close this
Pattern used in the script to select "node-IP-section" (
grep -A1 "$IP"
) allows false positives if searched IP is a sub-string of another node IPs. As result the script fails. E.g. (in our setup):We did proceed with upgrade after modification, but would it be possible to change it to something like
grep -A1 "^/${IP}$"
?BTW, existing PR modifying patterns in this script has the same issue only in awk pattern.