[
https://issues.jboss.org/browse/WFCORE-1392?page=com.atlassian.jira.plugi...
]
Tomas Hofman commented on WFCORE-1392:
--------------------------------------
Currently the sequence of actions during deployment is:
{code}
DeploymentAddHandler:
create deployment resource
contentRepository.addContent(...) or contentRepository.syncContent(...)
if (ENABLED attr is true):
DeploymentHandlerUtil.deploy(...)
complete step:
contentRepository.addContentReference(...)
DeploymentDeployHandler:
set ENABLED attr to true
DeploymentHandlerUtil.deploy(...)
DeploymentHandlerUtil.deploy():
if (is normal server):
emit notification
add RUNTIME step:
create and install deployment and content services
{code}
During undeployment:
{code}
DeploymentUndeployHandler:
if (ENABLED attr is true):
DeploymentHandlerUtil.undeploy(...)
DeploymentHandlerUtil.undeploy():
if (is normal server):
emit notification
add RUNTIME step:
remove deployment and content services
DeploymentRemoveHandler:
remove deployment resource
if (is normal server):
add RUNTIME step:
if (ENABLED attr is true):
remove deployment and content services
complete step:
contentRepository.removeContent(...)
{code}
So the asynchronicity is in that content is added into content repository in both, normal
and admin-only mode, but is removed from content repository only in normal mode. The
modifications would be purely in DeploymentRemoveHandler:
{code}
DeploymentRemoveHandler:
remove deploymetn resource
if (is normal server):
add RUNTIME step:
if (ENABLED attr is true):
remove deployment and content services
complete step:
contentRepository.removeContent(...)
+ else:
+ add RUNTIME step:
+ complete step:
+ contentRepository.removeContent(...)
{code}
DeploymentRemoveHandler is used in both, standalone and domain servers. Host controller in
domain mode already removes the content during undeployment in both modes, so no changes
are necessary there.
Undeploy doesn't remove Data content if server is in
--admin-only mode
-----------------------------------------------------------------------
Key: WFCORE-1392
URL:
https://issues.jboss.org/browse/WFCORE-1392
Project: WildFly Core
Issue Type: Enhancement
Components: Domain Management
Affects Versions: 2.1.0.CR2
Reporter: Chao Wang
Assignee: Tomas Hofman
Priority: Minor
{noformat}
Steps to Reproduce:
1. Start server instance using --admin-only flag
2. Deploy application using CLI command.
~~~
deploy /valid/path/WebApp.war --runtime-name=WebApp.war --name=WebApp.war
~~~
3. Undeploy application using CLI command:
~~~
undeploy WebApp.war
~~~
4. Application will be undeployed but content from 'data' directory are not
removed.
{noformat}
Lines:
https://github.com/wildfly/wildfly-core/blob/b1a4439f442f7984e681840c0f8d...
https://github.com/wildfly/wildfly-core/blob/e737eff554ee433ca54835154fd6...
runningMode value is ADMIN_ONLY will bypass that step in DeploymentRemoveHandler.java
leads to this behavior.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)