Bug 658519 - uninventory of agent complains about missing resource key
uninventory of agent complains about missing resource key
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
4.0.0
Unspecified Linux
low Severity medium (vote)
: ---
: ---
Assigned To: Lukas Krejci
Corey Welton
:
Depends On: 657232
Blocks: jon30-bugs
  Show dependency treegraph
 
Reported: 2010-11-30 10:58 EST by Lukas Krejci
Modified: 2011-05-23 21:16 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 657232
Environment:
Last Closed:
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 Lukas Krejci 2010-11-30 10:58:08 EST
+++ This bug was initially created as a clone of Bug #657232 +++

Description of problem:
Uninventory of platform complains about missing resource key and fails to delete spool for deleted agent. I noted this while verifying Bug 655187

Version-Release number of selected component (if applicable):
jon-server-2.4.1-SNAPSHOT build# ae99b5b

How reproducible:
Always.

Steps to Reproduce:
1. Inventory a platform.
2. Uninventory the platform.
3. Monitory server log.
  
Actual results:
2010-11-25 14:56:07,714 WARN  [org.hibernate.hql.ast.QueryTranslatorImpl] firstResult/maxResults specified with collection fetch; applying in memory!
2010-11-25 14:56:17,658 INFO  [org.rhq.enterprise.server.resource.ResourceManagerBean] User [org.rhq.core.domain.auth.Subject[id=2,name=rhqadmin]] is marking resource [Resource[id=10001, type=Linux, key=RHEL 5.5, name=RHEL 5.5, parent=<null>, version=Linux 2.6.18-194.17.1.el5]] for asynchronous uninventory
2010-11-25 14:56:18,028 WARN  [org.rhq.enterprise.server.core.comm.ServerCommunicationsService] {Failed to truncate/delete spool for deleted agent [Agent[id=10001,name=RHEL 5.5,address=10.65.201.129,port=16163,remote-endpoint=socket://10.65.201.129:16163/?rhq.communications.connector.rhqtype=agent&numAcceptThreads=1&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200,last-availability-report=1290677005767]] please manually remove the file: null}!!! missing resource message key=[Failed to truncate/delete spool for deleted agent [Agent[id=10001,name=RHEL 5.5,address=10.65.201.129,port=16163,remote-endpoint=socket://10.65.201.129:16163/?rhq.communications.connector.rhqtype=agent&numAcceptThreads=1&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200,last-availability-report=1290677005767]] please manually remove the file: null] args=[java.lang.NullPointerException]
2010-11-25 14:56:18,028 INFO  [org.rhq.enterprise.server.core.AgentManagerBean] Removed agent: Agent[id=10001,name=RHEL 5.5,address=10.65.201.129,port=16163,remote-endpoint=socket://10.65.201.129:16163/?rhq.communications.connector.rhqtype=agent&numAcceptThreads=1&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200,last-availability-report=1290677005767]
2010-11-25 14:56:18,154 ERROR [org.rhq.enterprise.server.discovery.DiscoveryServerServiceImpl] Received invalid inventory report from agent [Agent[id=0,name=RHEL 5.5,address=null,port=0,remote-endpoint=null,last-availability-report=null]]: Unknown Agent named [RHEL 5.5] sent an inventory report - that report will be ignored

Expected results:
There should be no stray files left when uninventoried.

Additional info:

--- Additional comment from sdharane@redhat.com on 2010-11-25 05:12:16 EST ---

I've opened separate bug (and did not update Bug 655187) as I get the above error even without bundle being uploaded.

--- Additional comment from lkrejci@redhat.com on 2010-11-30 10:56:58 EST ---

The exception about failure to delete/truncate spool was fixed by putting a check in place that checked the existence of the spool file.

The error messages about invalid inventory (or availability) reports still appear, but their content was updated to state the fact that if such error happens right after platform removal, it can be ignored.

commit a6d145b4c1f2f200a9bbcfc13933a01e9815f01b
Author: Lukas Krejci <lkrejci@redhat.com>
Date:   Mon Nov 29 18:35:13 2010 +0100

    BZ 657232
    * Don't throw NPE while destroying an agent on the server-side
      if there is no command spool file name defined.
    * Improve the error messages during intermittent confusion of the server
      and agent after platform removal.
Comment 1 Lukas Krejci 2010-11-30 11:28:13 EST
commit fe1b328c664ec536a9868837ece1a918bd39e414
Author: Lukas Krejci <lkrejci@redhat.com>
Date:   Mon Nov 29 18:35:13 2010 +0100

    BZ 657232
    * Don't throw NPE while destroying an agent on the server-side
      if there is no command spool file name defined.
    * Improve the error messages during intermittent confusion of the server
      and agent after platform removal.
Comment 2 Mike Foley 2011-04-19 16:15:41 EDT
i uninventoried the rhq-agent and did not see this error.  verified.
Comment 3 Corey Welton 2011-05-23 21:16:14 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 4 Corey Welton 2011-05-23 21:16:26 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 5 Corey Welton 2011-05-23 21:16:27 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 6 Corey Welton 2011-05-23 21:16:31 EDT
Bookkeeping - closing bug - fixed in recent release.

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