force sync attempt
still record errors in zabbix item
sync even on error
we have problems today where teams can't use new clusters because sync
is failing
@@ -4,14 +4,14 @@ host=$(hostname -s)
data=$(/usr/share/ansible/inventory/multi_inventory.py --refresh-cache 2>&1 1>/dev/null)
rsync_err_count=0
+err_count=0
if [ -n "$data" ]; then
# Log stderr from multi_inventory account refresh
echo "$(date "+%F %T") $data" >> /var/log/multi_inventory.log
err_count=$(echo "$data" | wc -l)
-else
- err_count=0
+fi
# rsync cache to targets (might be nothing here depending on host, expect only on bastion-nasa-1/2)
for target in {{ oo_rsync_cache_targets | join(' ') }};
@@ -24,7 +24,6 @@ else
rsync_err_count=$((rsync_err_count+1))
fi
done
-fi
# Send metrics
ops-metric-client -s $host -k multi_inventory.account.refresh -o $err_count
