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

Input SNMP plugin - upgrade gosnmp library to version 1.29.0 #8588

Merged
merged 1 commit into from
Jan 7, 2021

Conversation

dpajin
Copy link
Contributor

@dpajin dpajin commented Dec 17, 2020

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

No need to update README.md or unit tests, since functionality has not been changed.

The update of gosnmp library to version 1.28.0 for usage in input snmp plugin should fix the issue described in #3788.

Closes #3788

@Hipska
Copy link
Contributor

Hipska commented Dec 17, 2020

Shouldn’t the library also be updated at the other places where it is used? As now telegraf will be using 2 versions.

@dpajin
Copy link
Contributor Author

dpajin commented Dec 17, 2020

Shouldn’t the library also be updated at the other places where it is used? As now telegraf will be using 2 versions.

gosnmp library is used by two more input plugins, namely snmp_trap and snmp_legacy.
There are two challenges for updating gosnmp library for those two plugins:

  • If I change the library to gosnmp 1.28.0 in snmp_trap plugin, the unit tests fail. I don't know how to fix this as I am not actually go developer.
  • Plugin snmp_legacy does not have any unit tests.
  • Even if the tests pass, I don't use these plugins. so if I change the library for them it is hard for me to functionally test if they really work.

@srebhan
Copy link
Member

srebhan commented Dec 18, 2020

This PR is related to #7836, however please proceed with this PR as the other one is stalled.

@Hipska Hipska added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Dec 18, 2020
go.mod Outdated
@@ -66,6 +66,7 @@ require (
github.com/google/go-github/v32 v32.1.0
github.com/gopcua/opcua v0.1.12
github.com/gorilla/mux v1.6.2
github.com/gosnmp/gosnmp v1.28.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is now gosnmp v1.29 out. Do you see any reason to not directly upgrade to the new version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srebhan, I have version with 1.28.0 tested and running. In my use cases I have not noticed any issues so far which can be related to the upgrade. I see that there is gosnmp v1.29 and that it has only one change included, but I cannot estimate if that change can break the expected behaviors in Telegraf.

If you are willing to go with v1.29.0, I can change it in PR - let me know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try directly going to v1.29 then. Please update the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srebhan, updated to v1.29

@Hipska Hipska self-assigned this Dec 18, 2020
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. In the meantime v1.29 is out. Any reason not to upgrade to this version directly?

@srebhan srebhan self-assigned this Dec 18, 2020
@Hipska
Copy link
Contributor

Hipska commented Dec 18, 2020

Can you also add "Closes #3788" to your initial description? So merging this PR, will also close that issue.

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. You might want to retrigger CI by rebasing your work...

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Dec 18, 2020
@dpajin dpajin force-pushed the input_snmp_update_gosnmp_1_28 branch from 2bcac2b to 31ee083 Compare December 18, 2020 15:46
@dpajin dpajin changed the title Input SNMP plugin - upgrade gosnmp library to version 1.28.0 Input SNMP plugin - upgrade gosnmp library to version 1.29.0 Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/snmp feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SNMPv3 Telegraf sending unencrypted requests
4 participants