-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
No data on one temperature sensor prevents reading any other temp sensor #665
Comments
Quite similar problem as #572, but this time we may check a given explicit error and only bail out on it only on some cases. |
This case is indeed very similar to Windows PartitionsWithContext(). Unfortunately the other issue appears to have stalled. Proposal
The proposal does not break anything downstream because errors are still returned under the same conditions. There only is a difference if downstream read TemperatureStat without checking for errors, but that was a downstream bug in the first place. The proposal also allows downstream to easily take advantage of this bugfix whenever they are ready. Thoughts? |
Proposal: #668 This is slightly different than my previous proposal and has an even lower impact. There is no change to the existing functions and data types. Two new functions are available for the downstream projects who care about the case when only some of the temperature sensors have data. |
New proposed fix: #675 |
So your PR suggests introduce new I think it is very good solution for this problem. How do you think ? > @Lomanic And I have another proposal (sorry not exactly related to this issue): the PR defines it in |
Thanks for your comment and kind words @shirou. I agree with you that Here is what I am trying to do downstream: https://github.com/marcv81/telegraf/commit/058a83d18eb025a50490b291c27953c4a9712d9d. For now I just ignore the warnings, later I might log them appropriately. |
Hi @Lomanic and @shirou! @Lomanic you have a good point that we should not export anything more unless absolutely required, otherwise maintenance will be harder. I see a few ways forward without merging #678.
These idea are listed in order of preference. Do you have any comment? Or any better idea? Thanks for your help! |
#675 is merged. The correct place to |
Describe the bug
host_linux.go / SensorsTemperature() returns an error if any of the temperature sensors does not have any data available. It is however an acceptable state for a sensor and should not be treated as an error. Furthermore a single sensor with no data available should not prevent reading the temperatures from any of the other sensors.
Example of a sensor which functions correctly but does not provide any data under certain conditions: Intel Wireless LAN hardware and the iwlwifi module.
WiFi on:
WiFi off:
To Reproduce
Please see downstream bug: influxdata/telegraf#5692.
Expected behavior
When any of the temperature sensors does not have any data available, host_linux.go / SensorsTemperature() should still read and return the temperature values for the remaining sensors.
Environment (please complete the following information):
ver
]/etc/os-release
and the result ofuname -a
]sw_vers
anduname -a
freebsd-version -k -r -u
anduname -a
]uname -a
]/etc/os-release
uname -a
Ubuntu 16.04 + Kernel 5.0.7.
The text was updated successfully, but these errors were encountered: