New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed ospf polling not removing stale data #7503

Merged
merged 3 commits into from Oct 23, 2017

Conversation

Projects
None yet
3 participants
@laf
Member

laf commented Oct 17, 2017

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

Fixes: #7431

Tidied a fair bit up.

Fixed debug output

Fixed inserts to insert all the data we have, ensures mysql strict compliance as those columns don't allow nulls.

Fixed deletions as we were trying to access an array like it was one dimensional when it was multi due to the use of context name.

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Oct 18, 2017

Member

@laf This always updates all entries for me, the data seems to be correct.

#### Load poller module ospf ####
Processes: U Areas: UU Ports: UUU Neighbours: UUUUUUUUUUU
Member

murrant commented Oct 18, 2017

@laf This always updates all entries for me, the data seems to be correct.

#### Load poller module ospf ####
Processes: U Areas: UU Ports: UUU Neighbours: UUUUUUUUUUU
@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Oct 21, 2017

Member

Found and fixed - thanks @murrant

Member

laf commented Oct 21, 2017

Found and fixed - thanks @murrant

// Loop array of entries and update
if (is_array($ospf_nbrs_db)) {
foreach ($ospf_nbrs_db as $ospf_nbr_id => $ospf_nbr_db) {
$ospf_nbr_db = array_shift($ospf_nbr_db);

This comment has been minimized.

@murrant

murrant Oct 22, 2017

Member

This fixes the update issues, but I'm unsure if it breaks users with contexts. If we are only polling one context at a time, I assume it will be just fine.

@murrant

murrant Oct 22, 2017

Member

This fixes the update issues, but I'm unsure if it breaks users with contexts. If we are only polling one context at a time, I assume it will be just fine.

This comment has been minimized.

@laf

laf Oct 22, 2017

Member

We poll one context at a time.

@laf

laf Oct 22, 2017

Member

We poll one context at a time.

@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

scrutinizer-notifier Oct 22, 2017

The inspection completed: 3 new issues

scrutinizer-notifier commented Oct 22, 2017

The inspection completed: 3 new issues

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Oct 22, 2017

Member

Another pre-existing bug neighbor ids all have .0 appended to them.

Member

murrant commented Oct 22, 2017

Another pre-existing bug neighbor ids all have .0 appended to them.

@murrant murrant merged commit a4388e6 into librenms:master Oct 23, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@laf laf deleted the laf:fix/issue-7431 branch Oct 23, 2017

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.