Bug 1000059 - JON agent failed to discover postgres resources when postgres user alter its password
JON agent failed to discover postgres resources when postgres user alter its ...
Status: CLOSED WONTFIX
Product: JBoss Operations Network
Classification: JBoss
Component: Agent, Plugin -- Other (Show other bugs)
JON 3.1.2
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-22 11:04 EDT by Roger Hui
Modified: 2013-09-29 21:07 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-23 10:33:37 EDT
Type: Bug
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 Roger Hui 2013-08-22 11:04:53 EDT
Description of problem:

JON Agent failed to discover postgres database when we alter the postgres user password. I've tried both md5 or trust authentication same result. 


Version-Release number of selected component (if applicable):
RHEL 6.4 for both JON Server and Agent
JON 3.1.2
psql (8.4.13)


How reproducible:
Every time


Steps to Reproduce:
1. Set up a jon server and another server (remote one, localhost postgres won't hit this issue)
2. Install postgres 
3. /bin/su -c "psql -c \"ALTER USER postgres PASSWORD 'xxxx';\"" postgres
If the password hasn't altered, it will work. 
4. Observe the agent.log 
2013-08-20 17:21:43,735 INFO [ResourceDiscoveryComponent.invoker.daemon-1] (org.rhq.plugins.postgres.PostgresDiscoveryComponent)- Discovered a postgres process: ProcessScanResult: scan=[ProcessScan: query=[process|basename|match=^(postgres|postmaster)$,process|basename|nomatch|parent=^(postgres|postmaster)$], name=[unix]], info=[process: pid=[5903], name=[/usr/bin/postmaster], ppid=[1]]
2013-08-20 17:21:43,843 WARN [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failure during discovery for [Postgres Server] Resources - failed after 109 ms.
java.lang.Exception: Discovery component invocation failed.
at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:297)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:604)
at java.util.ArrayList.get(ArrayList.java:382)
at org.rhq.plugins.postgres.PostgresDiscoveryComponent.getServerResourceName(PostgresDiscoveryComponent.java:334)
at org.rhq.plugins.postgres.PostgresDiscoveryComponent.createResourceDetails(PostgresDiscoveryComponent.java:168)
at org.rhq.plugins.postgres.PostgresDiscoveryComponent.discoverResources(PostgresDiscoveryComponent.java:142)
at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:293)
... 5 more


Actual results:
JON won't discover the postgres resource on the inventory. 


Expected results:
JON should be able to handle this gracefully or have a way for user to enter the password in the connection settings before it blow up even in the discovery stage? 


Additional info:
Comment 1 Larry O'Leary 2013-08-23 10:33:37 EDT
The PostgreSQL plug-in is not supported with the JBoss ON product. This plug-in is maintained and provided by the upstream RHQ community. Please capture this issue in the RHQ Project Bugzilla[1].

If you need additional assistance or have questions regarding this component, please contact Red Hat Global Support Services[2].




[1]: https://bugzilla.redhat.com/enter_bug.cgi?product=RHQ%20Project
[2]: https://access.redhat.com/support/cases/new/
Comment 2 Roger Hui 2013-08-23 16:25:35 EDT
https://bugzilla.redhat.com/show_bug.cgi?id=1000612 as comment 1 suggested

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