-
Notifications
You must be signed in to change notification settings - Fork 164
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
Netdump enhancements #3307
Netdump enhancements #3307
Conversation
This can be useful to troubleshoot download failures caused by MITM changing the HTTP header fields (proxy, CDN, etc.). The option is disabled by default becase HTTP header field values may contain sensitive information, such as datastore credentials. Signed-off-by: Milan Lenco <milan@zededa.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, like this size of PRs way more than 9k+ LOC :D
lastNetdumpAge := time.Since(ctx.lastInfoNetdumpPub) | ||
// Ensure we get at least one netdump for the currently tested EVE upgrade. | ||
if zboot.IsCurrentPartitionStateInProgress() && | ||
(ctx.lastInfoNetdumpPub.IsZero() || lastNetdumpAge > uptime) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will happen if EVE will reboot during download in process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Netdump is collected after download completes. So if interrupted, EVE would restart download and netdump would be collected afterwards. Note that for downloader microservice we always collect netdumps - this change is for zedagent and nim to collect at least one netdump for requests towards the controller during upgrade. With reboot during upgrade we may end up collecting more, but that is OK. Not having any netdump for failed upgrade would be a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uncleDecart Will you please re-approve? Somehow adding comments makes eden tests skipped :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great and in case of reboot it'll be 2 different logs which we will be able to differentiate
Don't worry, I have two larger PRs coming up ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's run eden!
@uncleDecart Eden really does not like you ಥ‿ಥ |
@@ -1087,8 +1088,15 @@ func traceNextConfigReq(ctx *zedagentContext) bool { | |||
if !isNettraceEnabled(ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this and the corresponding info function only differ in the last*NetdumpPub they check and the functions are getting more complicated. Would it make sense to introduce a common function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense - done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but some nits.
3fb6ac6
to
ff66cd5
Compare
If upgrade fails, the recorded netdumps will remain persisted and available for retrieval from the older EVE version. Signed-off-by: Milan Lenco <milan@zededa.com>
ff66cd5
to
eb1e506
Compare
@uncleDecart Could you please hit approve again to trigger eden tests :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let the test begin
Two small commits with netdump enhancements that could be useful for troubleshooting of customer issues.
netdump: Add option to capture HTTP field values for download requests
This can be useful to troubleshoot download failures caused by MITM
changing the HTTP header fields (proxy, CDN, etc.).
The option is disabled by default becase HTTP header field values may contain
sensitive information, such as datastore credentials.
Ensure we get at least one netdump in each topic for tested EVE upgrade
If upgrade fails, the recorded netdumps will remain persisted and
available for retrieval from the older EVE version.