Project

General

Profile

Bug #33141

Disable broken collectd ipmi plugin

Added by Craig Shiels 9 months ago. Updated 1 day ago.

Status:
Ready for Testing
Priority:
No priority
Assignee:
Alexander Motin
Category:
OS
Target version:
Seen in:
Severity:
Low
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

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.

OpenIPMI.patch (7.56 KB) OpenIPMI.patch Craig Shiels, 05/05/2018 07:35 AM

Related issues

Related to FreeNAS - Bug #25894: Enable IPMI support in collectdResolved2017-09-16

Associated revisions

Revision 4dc4fee0 (diff)
Added by Alexander Motin 28 days ago

Remove IPMI support from collectd.

It seems to be broken from the day one, and rathe rthen fixing it
we should probably update collectd one day.

Ticket: #25894
Ticket: #33141

Revision 4f0388a8 (diff)
Added by Alexander Motin 6 days ago

Remove IPMI support from collectd.

It seems to be broken from the day one, and rathe rthen fixing it
we should probably update collectd one day.

Ticket: #25894
Ticket: #33141
(cherry picked from commit 4dc4fee092883cef9a6719d66889c35c43d4dfd4)

Revision 10b502ac (diff)
Added by Alexander Motin 6 days ago

Remove IPMI support from collectd.

It seems to be broken from the day one, and rathe rthen fixing it
we should probably update collectd one day.

Ticket: #25894
Ticket: #33141
(cherry picked from commit 4dc4fee092883cef9a6719d66889c35c43d4dfd4)

History

#1 Updated by Craig Shiels 9 months ago

  • Seen in changed from 9.3.1-STABLE-201602031011 to 11.1

#2 Updated by Craig Shiels 9 months 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 9 months ago

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 9 months 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 8 months ago

  • Assignee changed from Release Council to Alexander Motin

#6 Updated by Alexander Motin 8 months 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 7 months ago

  • Assignee changed from Benno Rice to Alexander Motin

#8 Updated by Alexander Motin 7 months ago

  • Status changed from Unscreened to Screened

#9 Updated by Alexander Motin 7 months ago

  • Related to Bug #25894: Enable IPMI support in collectd added

#10 Updated by Alexander Motin 6 months ago

  • Severity changed from New to Low

#11 Updated by Alexander Motin 28 days 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 28 days ago

  • Status changed from Screened to In Progress

#14 Updated by Dru Lavigne 6 days 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 6 days 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.

Also available in: Atom PDF