Bug 1130162 - Unable to uninstall remote agent via CLI without agent name property
Summary: Unable to uninstall remote agent via CLI without agent name property
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: CLI
Version: JON 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER03
: JON 3.3.0
Assignee: Michael Burman
QA Contact: Sunil Kondkar
URL:
Whiteboard:
Depends On:
Blocks: JON3-30, PRODMGT-542
TreeView+ depends on / blocked
 
Reported: 2014-08-14 13:08 UTC by Jeeva Kandasamy
Modified: 2014-12-11 14:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-11 14:01:05 UTC
Type: Bug


Attachments (Terms of Use)
server and cli log (31.33 KB, text/x-log)
2014-08-14 13:08 UTC, Jeeva Kandasamy
no flags Details

Description Jeeva Kandasamy 2014-08-14 13:08:44 UTC
Created attachment 926775 [details]
server and cli log

Description of problem:
Unable to uninstall remote agent via CLI without agent name property. 
To get installed status, running status we never use agent name and we use agent installation path. But only for uninstall there is option to provide agent installed location and without agent name it's failed to uninstalled. 

Version-Release number of selected component (if applicable):
JBoss Operations Network
Version : 3.3.0.DR01
Build Number : 6468454:dda0a47
GWT Version : 2.5.0
SmartGWT Version : 3.0p

How reproducible:
always

Steps to Reproduce:
1. Install a remote agent via CLI or GUI
2. Uninstall the same agent via CLI with the following commands,

rhqadmin@jeeva-lab-xqmah.bc.jonqe.lab.eng.bos.redhat.com:7080$ rbi
RemoteAccessInfo:
	     agentName: 
	          host: jeeva-baseline-pup.bc.jonqe.lab.eng.bos.redhat.com
	hostAuthorized: false
	           key: 
	      password: abc
	          port: 22
	    rememberMe: false
	          user: abc

rhqadmin@jeeva-lab-xqmah.bc.jonqe.lab.eng.bos.redhat.com:7080$ RemoteInstallManager.uninstallAgent(rbi)


Error:
javax.ejb.EJBException: [Warning] java.lang.IllegalArgumentException: Agent [null] does not have a known install location. For security purposes, the uninstall will not be allowed. You will have to manually uninstall it from that machine.
RemoteInstallManager.uninstallAgent(rbi) 
^




Additional info: Server log and agent log is attached.

Comment 3 Michael Burman 2014-09-02 22:21:31 UTC
Fixed in master:

commit 1032ab527f12ca72507cf9f4a5431a8b77d501d6
Author: Michael Burman <miburman@redhat.com>
Date:   Tue Sep 2 00:06:24 2014 +0300

    [BZ 1130162] Allow uninstallation to occur with installPath, like stop/start operations. If name is provided, use that information to verify in

Comment 4 Thomas Segismont 2014-09-10 15:52:20 UTC
Cherry-picked over to release/jon3.3.x

commit 561ce97dee99c63e9ab2a585d604db6e91c4f315
Author: Michael Burman <miburman@redhat.com>
Date:   Tue Sep 2 00:06:24 2014 +0300

    [BZ 1130162] Allow uninstallation to occur with installPath, like stop/start operations. If name is provided, use that information to verify information like bef
    
    (cherry picked from commit 1032ab527f12ca72507cf9f4a5431a8b77d501d6)
    Signed-off-by: Thomas Segismont <tsegismo@redhat.com>

Comment 5 Simeon Pinder 2014-09-17 02:49:28 UTC
Moving to ON_QA as available for test with the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=385149

Comment 6 Sunil Kondkar 2014-09-19 11:49:27 UTC
Verified on version : 3.3.0.ER03 build Number :4aefe39:44e33a4

Verified that remote agent is uninstalled successfully via CLI without agent name property :

RemoteInstallManager.uninstallAgent(rbi,agentPath)


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