Bug 835693

Summary: [Agent RPM] Uninstall does not remove preferences folder and xml configuration file
Product: [JBoss] JBoss Operations Network Reporter: Zhengping Jin <zjin>
Component: AgentAssignee: Stefan Negrea <snegrea>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: high    
Version: JON 3.1.0   
Target Milestone: ---   
Target Release: JON 3.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-11 11:03:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 837381    

Description Zhengping Jin 2012-06-26 20:42:30 UTC
Description of problem:
Once agent has been running, the agent will create files in /var/log/jboss-on/agent and /var/lib/agent, which will not be deleted after uninstall.
On the contray, the config file will be /etc/jboss-on/agent/agent-configuration.xml. 
Please modify this procedure.

Version-Release number of selected component (if applicable): 3.1.0


How reproducible: 100%


Steps to Reproduce:
1. install the agent: rpm -i *.rpm
2. run the agent: service jon-agent start
3. uninstall the agent: rpm -e *
  
Actual results:
Files in /var/log/jboss-on/agent and in folder /var/lib/agent will be kept, but 
/etc/jboss-on/agent/agent-configuration.xml will be deleted.

Expected results:
keep the configurations and logs, remove unrelated files

Additional info:

Comment 1 Mike Foley 2012-07-02 15:21:28 UTC
bz triage 7/2 stefan, loleary, asantos, armine, zjin, viet.

some development activity here to do per discussion.

logs should survive
some question on data file
policy on configuration retention

Comment 2 Stefan Negrea 2012-07-03 22:21:58 UTC
The retention policy on the following files/folders should be updated to:
1) /var/log/jboss-on/agent - Keep
2) /etc/jboss-on/agent/agent-configuration.xml - Retain if modified


Further investigation is required for /var/lib/agent folder.

Comment 3 Stefan Negrea 2012-07-10 15:43:24 UTC
Updated retention policy for state directory and agent configuration xml.

The agent has now the following retention policy:
1) State directory - removed by %postun script only on uninstallation, preserved on upgrades
2) agent-configuration.xml- %config(noreplace)
3) Log files - preserved forever

Comment 4 Zhengping Jin 2012-07-19 16:15:18 UTC
http://download.devel.redhat.com/brewroot/work/tasks/4773/4614773/jboss-on-agent-3.1.0.GA-8.el6_3.noarch.rpm

1) verified
2) this feature is prepared for the future upgrade, only codewalk verified.
3) verified