Bug 701223

Summary: JMX plugin is not usable in munin-node
Product: [Fedora] Fedora EPEL Reporter: Oded Arbel <oded>
Component: muninAssignee: Kevin Fenzi <kevin>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el5CC: drjohnson1, ingvar, kevin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-07 05:00:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Patch to fix the JMX problems in munin-node
none
Patch to fix the JMX problems in munin-node none

Description Oded Arbel 2011-05-02 07:21:57 UTC
Description of problem:
In the current version of munin in EPEL 5, the JMX plugin is not usable because it is not built correctly and a standard installation (requiring only munin-node) includes the jmx_ plugin but does not install the JAR that it requires so you get a broken install.

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

How reproducible:
Always

Steps to Reproduce:
1. install munin-node
2. try to use the jmx_ plugin that is available in the plugins directory
  
Actual results:
the plugin tries to find the munin-jmx-plugins.jar which is not installed, and even if the munin-java-plugins package was installed, jmx_ tries to find the jar in /opt/munin/lib while munin-java-plugins installs the jar in the standard java jar directory.

Expected results:
1. jmx_ should be built with the correct path to the jar
2. the jmx_ plugin should never be installed broken - either munin-node should require munin-java-plugins or the jmx_ plugin should be installed in munin-java-plugins

Additional info:
Also, the munin spec files makes some weird assumptions on the availability of build capabilities (such as java) based on RedHat brand names - this makes the build produce weird results in other EL distributions.

Comment 1 Oded Arbel 2011-05-02 08:13:01 UTC
Created attachment 496188 [details]
Patch to fix the JMX problems in munin-node

Attached is a path to the spec file to fix the problem. The patch does the following changes:
1. Replace the checks for building the java functionality to use bcond (see bug #112663) instead of testing for "rhel > 4 or fedora > 6".
2. Set JAVALIBDIR in build as well as install because the jmx plugin uses automake to generate the path to the jar.
3. Use a list of valid plugins for munin-node's %files section, where valid plugin is "any plugin except jmx"
4. Package the jmx plugin in munin-java-plugins

Comment 2 Oded Arbel 2011-05-02 09:21:49 UTC
Created attachment 496195 [details]
Patch to fix the JMX problems in munin-node

There was a bug in the previous patch - I filtered on _jmx instead of jmx_. This one works better. Sorry.

Comment 3 Kevin Fenzi 2011-08-05 22:00:11 UTC
Sorry for the delay here. 

I don't see where you are setting JAVALIBDIR or how thats working? 
Looking further at the plugin I see that its looking in the wrong place for JAVA_BIN too. 

Will dig around some more.

Comment 4 Kevin Fenzi 2011-08-05 22:07:11 UTC
fixing component. ;(

Comment 5 Oded Arbel 2011-08-12 08:46:07 UTC
Thanks - does that mean that there will be an updated package with the JAVALIBDIR fix?

Comment 6 Kevin Fenzi 2011-08-12 15:14:46 UTC
As soon as I can figure out how to get it to build with the right path, sure. ;) 

Currently it's always looking in the wrong place...

Comment 7 d. johnson 2015-03-07 05:00:38 UTC
This should be fixed in the current release (2.0.25).