De-dupe checks for hostname when adding hosts #2189

Merged
merged 2 commits into from Oct 26, 2015

Projects

None yet

5 participants

@laf
Member
laf commented Oct 22, 2015

Fix #2105

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.

@laf laf De-dupe checks for hostname when adding hosts
5c80327
@laf laf added the Bug label Oct 22, 2015
@paulgear
Member

I think a name like host_exists would more accurately reflect what that function does.

@paszczus

It looks like its working fine. Since i have download this version i dont have duplicates in my db

@laf laf Updated function name for blahdeblah
7e9dcc7
@laf
Member
laf commented Oct 25, 2015

Updated function name.

As @paszczus has tested can we get this merged sooner rather than later please as it's a bug fix.

@SaaldjorMike SaaldjorMike merged commit 74ae9b7 into librenms:master Oct 26, 2015

2 checks passed

Auto-Deploy Build finished. No test results found.
Details
Scrutinizer No new issues
Details
@laf laf deleted the laf:issue-2105-2 branch Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment