Red Hat Bugzilla – Bug 534424
be able to download plugins that are only specific to a platform
Last modified: 2010-08-18 10:54:49 EDT
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.
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).
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:
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1220
This bug relates to RHQ-978
mass add of key word FutureFeature to help track
Per 17-Aug-2010 triage, closing this bug. It can be reopened if considered a critical issue.