-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
docs(specs): Add probe
as value to startup_error_behavior
#16052
docs(specs): Add probe
as value to startup_error_behavior
#16052
Conversation
probe
as value to startup_error_behavior
probe
as value to startup_error_behavior
@srebhan sorry for the ping, just curious if you have time to give thoughts on this spec? |
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.
Thanks for making this PR! I have one question below, but additionally I think it may make more sense to include this as an edit to the existing spec (possibly dependent on the outcome from my other question)
Additionally, could you format the long lines with line breaks to reduce the line length a bit? Thanks!
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.
@LandonTClipp sorry for the late response and thanks for the spec! That already reads quite nicely. I think you need to more describe the intended behavior here than implementations. Use must and should for mandatory and optional features respectively. I would also love to see the Configuration
part to be added to TSD-006
to keep all option related aspects there...
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.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.
Thanks @LandonTClipp for working with us on this spec! Some more comments from my side, but I feel we are very close...
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.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.
Thanks @LandonTClipp! The PR looks great! Could you please rename the file to tsd-009-probing.md
as we already merged TSD-008 in the meantime. Please also change the reference in TSD-006 accordingly!
Regarding reverting the code in nvidia-smi
, yes I think you can revert or change the implementation to reflect this spec as we did not release the mentioned feature yet...
Excellent, I'll probably just revert for now, in case I cannot implement this spec in time for the release. |
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.
Thanks a lot @LandonTClipp!
@DStrand1 sorry for the ping but I wanted to check what you think of this. I'm motivated to implement it for the plugins I care about :D |
@LandonTClipp could you please fix the linter issues? Seems like you do have a lot of trailing spaces in markdown.... |
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
@srebhan 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.
Thanks for the great work!
If probing is available *and* returns an error Telegraf must *ignore* the | ||
plugin as-if it was not configured at all. |
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.
It is not clear what happens if the probing is not returning an error. As it reads that this probing only needs to be done when startup returns errors.
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.
@Hipska perhaps one more paragraph added here: https://github.com/influxdata/telegraf/pull/16052/files#diff-2d519c82d1022b0befbd7601817fd1b2073ad5e9b607cd9c2205f0529b7d0fffR47 more clearly outlining what Telegraf does on Probe success is what you're looking for? I'm happy to add more clarification.
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.
Yeah indeed.
Also, is probing really only on startup? Meaning if conditions change and recourses come available, that will only take effect when telegraf gets restarted?
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.
That's correct. Sorry for the delayed response on the update to the spec, I will get to it soon.
This spec is backwards compatible so if you don't want this behavior, you don't need to do anything.
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.
As said in other comment, maybe the spec should clarify a use case? When would it be handy to only be able to recover by restarting telegraf completely?
(cherry picked from commit 795b8a9)
When plugins are first instantiated, Telegraf will call the plugin's `Start()` | ||
method (for inputs) or `Connect()` (for outputs) which will initialize its | ||
configuration based off of config options and the running environment. It is | ||
sometimes the case that while the initialization step succeeds, the upstream | ||
service in which the plugin relies on is not actually running, or is not capable | ||
of being communicated with due to incorrect configuration or environmental | ||
problems. In situations like this, Telegraf does not detect that the plugin's |
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.
Initialisation happens in Init()
, connection attempts in Start()
(for service plugins) / Connect()
(for outputs).
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.
Summary
This PR submits a spec for a new
probe
value tostartup_error_behavior
.Checklist
Related issues
resolves #16028