Bug 1018026 - (6.4.0)Fail to remove the content file from the domain/servers/serverName/data/content folder when undeploying application from a stopped server.
(6.4.0)Fail to remove the content file from the domain/servers/serverName/dat...
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Domain Management (Show other bugs)
Unspecified Unspecified
urgent Severity urgent
: DR11
: EAP 6.4.0
Assigned To: Emmanuel Hugonnet (ehsavoie)
Petr Kremensky
: 1124689 (view as bug list)
Depends On:
Blocks: 1163634
  Show dependency treegraph
Reported: 2013-10-10 23:05 EDT by Daniel Wang
Modified: 2017-10-09 20:20 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Deployments are removed from the content repository as part of management operations that remove them from the configuration. But, if a server in a managed domain is stopped when those management operations occur, the content will not be removed from that server's repository. Consequence: Deployment content for deployment archives that are no longer used in the domain can accumulate in individual servers' content repository, wasting disk space. Fix: EAP now periodically runs a background process that checks for and removes content in the repository that is not referenced in the configuration model. Result: If an archive has been removed from the domain while a server that has a copy of it is offline remains, the garbage collection protocol will remove it within 5 to 10 minutes of the server being started.
Story Points: ---
Clone Of:
: 1163634 (view as bug list)
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-122 Major Resolved Clean unreferenced items from the content repository 2017-12-14 03:53 EST
Red Hat Knowledge Base (Solution) 536033 None None None Never

  None (edit)
Description Daniel Wang 2013-10-10 23:05:14 EDT
Description of problem:
The subfolder located in domain/servers/serverName/data/content cannot be removed when undeploying the application from a stopped server.

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

How reproducible:

Steps to Reproduce:
1. Start EAP 6 as domain mode.
1.1 <EAP6>/bin/domain.xml
2. Using JBOSS CLI to connect to the EAP6. 
2.1 <EAP6>/bin/jboss_cli.sh --connect
3. deploy one application to main-server-group via JBOSS CLI. After this, there is a new subfolder will be created in the directory domain/servers/serverName/data/content.
3.1 CLI> deploy /path/to/XX.ear --server-groups=main-server-group
4. stop the main-server-group
4.1 CLI> /server-group=main-server-group:stop-servers
5. undeploy the application. 
5.1 CLI> undeploy XX.ear --server-groups=main-server-group
6. start the main-server-group

Actual results:
It displays JBAS014901: Content removed from location domain/servers/serverName/data/content in log. But the subfolder related to the XX.ear doesn't be removed from the content folder.

Expected results:
The subfolder related to the XX.ear could be removed from the content folder.

Additional info:
This issue could be reproduced in EAP6.1.0 GA.
Comment 2 James Livingston 2014-07-31 20:21:00 EDT
*** Bug 1124689 has been marked as a duplicate of this bug. ***
Comment 3 James Livingston 2014-07-31 23:25:37 EDT
Bug 1029851 is about a similar problem caused by cancelling the second step of the web UI, which will hopefully be resolved by switching to a single-step UI.
Comment 5 JBoss JIRA Server 2014-09-23 10:09:13 EDT
Emmanuel Hugonnet <ehugonne@redhat.com> updated the status of jira WFLY-122 to Coding In Progress
Comment 6 Emmanuel Hugonnet (ehsavoie) 2014-11-19 02:15:51 EST
PR : https://github.com/jbossas/jboss-eap/pull/1969
Upstream : https://github.com/wildfly/wildfly-core/pull/284
Comment 7 Petr Kremensky 2014-11-26 08:28:56 EST
This doesn't work for me (6.4.0.DR11):

./jboss-cli.sh -c
[domain@localhost:9999 /] deploy test.war --server-groups=main-server-group
[domain@localhost:9999 /] /server-group=main-server-group:stop-servers
[domain@localhost:9999 /] undeploy test.war --server-groups=main-server-group
[domain@localhost:9999 /] /server-group=main-server-group:start-servers

find . -name content

content files from domain/servers/server-*/data/content are still not removed
Comment 8 Emmanuel Hugonnet (ehsavoie) 2014-11-26 08:36:50 EST
How long did you wait ?
Comment 9 Petr Kremensky 2014-11-26 09:33:10 EST
Verifying the issue after chat with Emmanuel.

EAP triggers :clean-obsolete-content() every 5 minutes. All unused content is marked as obsolete on first run, all marked stuff is removed on second run.

Verified on EAP 6.4.0.DR11

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