Central function now for checking for duplicate hostnames.
This is called twice now, once as it was before to save on a load of icmp / snmp queries if the device already exists but then again just at the end before the DB insert to stop race conditions happening due to slow icmp / snmp queries.
This should stop devices being added with the same hostname from things like auto-discovery.
De-dupe checks for hostname when adding hosts
Auto-Deploy finished, Test PR at http://2189.ci.librenms.org or https://2189.ci.librenms.org
I think a name like host_exists would more accurately reflect what that function does.
It looks like its working fine. Since i have download this version i dont have duplicates in my db
s working fine. Since i have download this version i don
Updated function name for blahdeblah
Updated function name.
As @paszczus has tested can we get this merged sooner rather than later please as it's a bug fix.