Skip to content
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: fix already closed connections on multiindex measurements #525

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

sbengo
Copy link
Collaborator

@sbengo sbengo commented Nov 15, 2022

On the measurement gatherloop the measurement is marked as non-connected if it becomes unresponsive or the metrica cannot be retrieved for some connectivity reason.

When it happens, the gatherloop tries to reconnect again querying complete sysinfo and resets the snmpclient

This PR tries to fix the logic of the snmpclient inherit from the measurement, as it is using a pointer of a copy instead of the original snmpclient.

In this case, any change on the measurement snmpclient doesn't populates to the multiindex measurement snmpclient, and an already closed connection was being used and the load index is not being done and all the indexes were remain as the last time that they got gethered (wrong if the processed failed at some point)

fix #524

@sbengo sbengo marked this pull request as ready for review November 15, 2022 14:47
@sbengo sbengo marked this pull request as draft November 15, 2022 14:51
On the measurement gatherloop the measurement is marked as non-connected
if it becomes unresponsive or the metrica cannot be retrieved for some
connectivity reason.

When it happens, the gatherloop tries to reconnect again querying
complete sysinfo and resets the snmpclient

This PR tries to fix the logic of the snmpclient inherit from the
measurement, as it is using a pointer of a copy instead of the original
snmpclient.

In this case, any change on the measurement snmpclient doesn't populates
to the multiindex measurement snmpclient, and an already closed
connection was being used and the load index is not being done and all
the indexes were remain as the last time that they got gethered (wrong
if the processed failed at some point)

fix #524
@sbengo sbengo marked this pull request as ready for review November 15, 2022 14:54
@toni-moreno toni-moreno merged commit d645bf2 into master Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] MultiIndex measurement not reloaded on some cases - use of closed network connection
2 participants