Bug #33141
Disable broken collectd ipmi plugin
Description
The ipmi shared library is shipped in /usr/local/lib/collectd and depends on the OpenIPMI shared library in /usr/local/lib however when collectd runs, it fails because it cannot see the ipmi.so. This is because LD_LIBRARY_PATH is not initialised. Another way to fix this is to populate /etc/ld.so.conf properly.
Related issues
Associated revisions
History
#1
Updated by Craig Shiels almost 3 years ago
- Seen in changed from 9.3.1-STABLE-201602031011 to 11.1
#2
Updated by Craig Shiels almost 3 years ago
This may not be a ld.so.conf problem but the error is:
/usr/local/lib/collectd/ipmi.so: Undefined symbol "ipmi_smi_setup_con"
#3
Updated by Craig Shiels almost 3 years ago
- File OpenIPMI.patch OpenIPMI.patch added
Craig Shiels wrote:
This may not be a ld.so.conf problem but the error is:
/usr/local/lib/collectd/ipmi.so: Undefined symbol "ipmi_smi_setup_con"
This is because OpenIPMI is built without support for ipmi_smi. The configure options in OpenIPMI disable it by default but it more or less works as it is if you use <sys/ipmi.h> from FreeBSD.
See the attached patch for additional details.
However it would seem that this is not enough to get ipmi from the local system :(
truss shows this:
28425: ioctl(8,IPMICTL_RECEIVE_MSG_TRUNC,0x7fffdfffdc10) ERR#35 'Resource temporarily unavailable'
28425: select(9,{ 8 },{ },{ },{ 1.000000 }) = 1 (0x1)
28425: ioctl(8,IPMICTL_RECEIVE_MSG_TRUNC,0x7fffdfffdc10) ERR#35 'Resource temporarily unavailable'
#4
Updated by Craig Shiels almost 3 years ago
workaround - use a python plugin to invoke ipmitool
import collectd
import string
import subprocess
from subprocess import Popen, PIPE
def read_func():
lines = []
p = Popen(['/usr/local/bin/ipmitool', 'sensor'], stdout=PIPE, stderr=PIPE, shell=False)
data = p.communicate(input='')[0]
lines = data.splitlines()
if len(lines) > 0:
for line in lines:
F = line.split('|')
type = None
ftwo = F[2].lower()
if 'rpm' in ftwo:
typename = 'fanspeed'
elif 'degre' in ftwo:
typename = 'temperature'
elif 'volt' in ftwo:
typename = 'voltage'
else:
continue
value = F[1].lstrip()
value = value.strip()
if value == 'na':
continue
name = F[0].lstrip()
name = name.strip()
val = collectd.Values(type = typename, type_instance = name)
val.plugin = 'ipmi'
val.dispatch(values=[value])
collectd.register_read(read_func)
#5
Updated by Dru Lavigne almost 3 years ago
- Assignee changed from Release Council to Alexander Motin
#6
Updated by Alexander Motin almost 3 years ago
- Assignee changed from Alexander Motin to Benno Rice
It would be good to at least investigate how badly this code is broken. It seems we are not using IPMI collectd plugin now in config, but may be it could be useful.
#7
Updated by Dru Lavigne over 2 years ago
- Assignee changed from Benno Rice to Alexander Motin
#8
Updated by Alexander Motin over 2 years ago
- Status changed from Unscreened to Screened
#9
Updated by Alexander Motin over 2 years ago
- Related to Bug #25894: Enable IPMI support in collectd added
#10
Updated by Alexander Motin over 2 years ago
- Severity changed from New to Low
#11
Updated by Alexander Motin about 2 years ago
- Subject changed from collectd ipmi plugin does not load due to shared library missing to Disable broken collectd ipmi plugin
- Target version changed from Backlog to 11.2-U2
- Seen in changed from 11.1 to 11.2-RELEASE
- Needs QA changed from Yes to No
I've just retried it with latest ports and it is still broken. I've decided just to disable it for now. May be collectd update one day help it.
This is commit for 11-stable: https://github.com/freenas/build/commit/4dc4fee092883cef9a6719d66889c35c43d4dfd4
#12
Updated by Alexander Motin about 2 years ago
- Status changed from Screened to In Progress
#13
Updated by Alexander Motin about 2 years ago
PR for 11.2-stable: https://github.com/freenas/build/pull/166
master commit: https://github.com/freenas/build/commit/4dc4fee092883cef9a6719d66889c35c43d4dfd4
#14
Updated by Dru Lavigne about 2 years ago
- Status changed from In Progress to Ready for Testing
- Needs QA changed from No to Yes
- Needs Merging changed from Yes to No
#15
Updated by Alexander Motin about 2 years ago
Merged to 11.2-stable.
QA: There should be no /usr/local/lib/collectd/ipmi.so and openipmi package installed any more. No other visible changes.
#18
Updated by Timothy Moore II about 2 years ago
Docs PRs: https://github.com/freenas/freenas-docs/pull/648 [master], https://github.com/freenas/freenas-docs/pull/647 [angulargui]
#19
Updated by Bonnie Follweiler about 2 years ago
- Status changed from Ready for Testing to Passed Testing
- Needs QA changed from Yes to No
Test passed in FreeNAS-11.2-U2-INTERNAL81
#20
Updated by Dru Lavigne about 2 years ago
- Status changed from Passed Testing to Done
- Needs Doc changed from Yes to No