Bug 534424 - (RHQ-1220) be able to download plugins that are only specific to a platform
be able to download plugins that are only specific to a platform
Status: CLOSED WONTFIX
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
unspecified
All All
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
http://jira.rhq-project.org/browse/RH...
: FutureFeature, Improvement
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-06 12:56 EST by John Mazzitelli
Modified: 2010-08-18 10:54 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-18 10:54:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Mazzitelli 2008-12-06 12:56:00 EST
Running an agent I see this in the logs:

2008-12-06 12:39:52,625 WARN  [InventoryManager.discovery-1] (rhq.core.pc.inventory.AutoDiscoveryExecutor)- Plugin discovery failed - skipping
java.lang.UnsatisfiedLinkError: Unable to load library 'virt': The specified module could not be found.

	at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:114)
	at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:157)
	at com.sun.jna.Library$Handler.<init>(Library.java:123)
	at com.sun.jna.Native.loadLibrary(Native.java:258)
	at com.sun.jna.Native.loadLibrary(Native.java:244)
	at org.rhq.plugins.virt.LibVirt.<clinit>(LibVirt.java:34)
	at org.rhq.plugins.virt.LibVirtConnection.<init>(LibVirtConnection.java:38)
	at org.rhq.plugins.virt.VirtualizationDiscoveryComponent.discoverResources(VirtualizationDiscoveryComponent.java:39)
	at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.pluginDiscovery(AutoDiscoveryExecutor.java:194)

The agent is running on Windows, downloaded the virt-plugin and tried running it.  But obviously, this plugin is useless on Windows (there is no native library libvirt for windows).

We should be able to restrict what plugins an agent downloads based on the platform the agent is running on. So, perhaps when the agent sends up the "get latest plugins" message, the agent sends up what its platform is ("windows", "macos", "linux", "hpux", "solaris", etc).  The server will then only tell the agent about the plugins that are value.

OR, rather than introduce server-side changes, maybe the agent just doesn't load in/deploy/enable plugins that are not valid for its platform.

This all requires a new piece of metadata in the plugin descriptor.  Perhaps an option element under the <plugin> root element or under each individual <server> or <service> resource.   The element is optional so existing plugins don't change (if the element isn't specified, we assume the plugin will work on all platforms).

Something like:

<supported-platforms>
   <platform>linux</platform>
   <platform>hp-ux</platform>
</supported-platforms>

So you can support 1 or more than one platforms.  The text values of the <platform> elements are going to have to be either strings that our native-system module uses when reporting the platform or they can be values of platforms supported in the platform plugin. I'm thinking the former is going to be the one to use, but I'm not sure.  I'm talking about the string values returned by  SystemInfo.getOperatingSystemType which are http://svn.rhq-project.org/repos/rhq/trunk/modules/core/native-system/src/main/java/org/rhq/core/system/OperatingSystemType.java . We could even go narrower than that by possibly using SystemInfo.getOperatingSystemName/Version (see http://svn.rhq-project.org/repos/rhq/trunk/modules/core/native-system/src/main/java/org/rhq/core/system/SystemInfo.java ) so we could have:

<supported-platforms>
   <supported-platform>
      <os-type>windows</os-type>
   </supported-platform>
   <supported-platform>
      <os-name>solaris</os-name>
      <os-version>2.9</os-version>
   </supported-platform>
</supported-platforms>
Comment 1 Red Hat Bugzilla 2009-11-10 15:28:22 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1220
This bug relates to RHQ-978
Comment 2 wes hayutin 2010-02-16 12:08:35 EST
mass add of key word FutureFeature to help track
Comment 3 Corey Welton 2010-08-18 10:54:49 EDT
Per 17-Aug-2010 triage, closing this bug.  It can be reopened if considered a critical issue.

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