Bug 479208 - collectd is built without iptables plugin
collectd is built without iptables plugin
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: collectd (Show other bugs)
10
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Alan Pevec
Fedora Extras Quality Assurance
:
Depends On: 462207
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-07 19:15 EST by Joel Uckelman
Modified: 2009-03-04 11:29 EST (History)
7 users (show)

See Also:
Fixed In Version: 4.5.3-1.fc10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-04 11:29:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to update libip6tc.c for newer def of in6_addr in <netinet/in.h> (408 bytes, patch)
2009-01-09 08:40 EST, Joel Uckelman
no flags Details | Diff

  None (edit)
Description Joel Uckelman 2009-01-07 19:15:22 EST
Description of problem:

The iptables plugin is missing from the collectd package.


Version-Release number of selected component (if applicable):

collectd-4.5.1-2.1.fc10.x86_64


How reproducible:

Always

Steps to Reproduce:
1. Install collectd.
2. Notice that /usr/lib64/collectd/iptables.so doesn't exist.
  
Actual results:

/usr/lib64/collectd/iptables.so is missing.

Expected results:

/usr/lib64/collectd/iptables.so should be there.

Additional info:

The changelog says that the iptables plugin was disabled, but then reenabled again:

* Mon Jun 09 2008 Alan Pevec <apevec@redhat.com> 4.4.1-1
- New upstream version 4.4.1.
- plugin changes: reenable iptables, disable ascent

* Tue May 27 2008 Alan Pevec <apevec@redhat.com> 4.4.0-2
- disable iptables/libiptc
Comment 1 Matthias Saou 2009-01-09 07:11:06 EST
I can confirm this. Looking at configure.in, the iptables plugin requires libiptc.h, so I'm guessing that the plugin disappeared because of bug #462207 (filed against F-9, but I can confirm that it's the same on F-10).

For this to not go unnoticed from now on, you might want to explicitly list all of the expected plugins in the %files section of the spec file. I would definitely do that if I were the owner of the package :-)
Comment 2 Joel Uckelman 2009-01-09 08:40:04 EST
Created attachment 328543 [details]
patch to update libip6tc.c for newer def of in6_addr in <netinet/in.h>
Comment 3 Joel Uckelman 2009-01-09 08:41:52 EST
(In reply to comment #1)
> I can confirm this. Looking at configure.in, the iptables plugin requires
> libiptc.h, so I'm guessing that the plugin disappeared because of bug #462207
> (filed against F-9, but I can confirm that it's the same on F-10).

The collectd source comes with its own libiptc.h, so I think that's not the problem.

If I change '--without-libiptc' to '--with-libiptc' (or simply remove it) in the spec file, the build blows up on me:

 gcc -DHAVE_CONFIG_H -I. -I../../src -DIPTABLES_VERSION=\"1.4.0\" -I/lib/modules/2.6.27.9-159.fc10.x86_64/source/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c libip4tc.c  -fPIC -DPIC -o .libs/libiptc_la-libip4tc.o
libip6tc.c: In function 'ipv6_prefix_length':
libip6tc.c:141: error: 'const struct in6_addr' has no member named 'in6_u'
libip6tc.c:145: error: 'const struct in6_addr' has no member named 'in6_u'
make[3]: *** [libiptc_la-libip6tc.lo] Error 1


The problem appears to be that the definition of in6_addr in <netinet/in.h> changed sometime after collectd started shipping its own copy of the libiptc source.

For a discussion of the problem, see here

  https://wiki.edubuntu.org/DidierRoche/MOTU/bugsaction

under the heading "backport ufw 0.22/iptable to hardy. Bug #268931".

There appears to be a simple solution, viz., replacing 'in6_u.u6_addr32' with 's6_addr32' in src/libiptc/libip6tc.c.

I've attached a patch for this. This change is sufficient for getting the source RPM to build an iptables.so plugin. (I haven't tested the plugin yet, however, so I can't say whether this change is sufficient for building a *working* iptables.so plugin, though.)
Comment 4 Joel Uckelman 2009-01-09 08:43:22 EST
Also, changes to the spec file:

Remove '--without-libiptc', add '--enable-iptables'.
Comment 5 Joel Uckelman 2009-01-09 09:08:53 EST
(In reply to comment #3)
> (I haven't tested the plugin yet,
> however, so I can't say whether this change is sufficient for building a
> *working* iptables.so plugin, though.)

I'm collecting some data with it now, so, yes, my patch does appear to work.
Comment 6 Alan Pevec 2009-03-02 18:38:40 EST
patched upstream a30f785e3411091fceb2f5c850beb5067c18396d

rebasing to 4.5.3 which includes it
Comment 7 Fedora Update System 2009-03-03 18:08:57 EST
collectd-4.5.3-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/collectd-4.5.3-1.fc10
Comment 8 Fedora Update System 2009-03-04 11:29:42 EST
collectd-4.5.3-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.