Jan Martiska created WFLY-1803:
----------------------------------
Summary: Failure to undo a patching process which fails
Key: WFLY-1803
URL:
https://issues.jboss.org/browse/WFLY-1803
Project: WildFly
Issue Type: Bug
Reporter: Jan Martiska
Assignee: Emanuel Muckenhuber
Scenario:
A patch tries to modify a misc file, but the process doesn't have write permissions
for it (or some other kind of exception occurs, I can imagine an IOException when writing
to files)
In this case, the patching process fails and is unable to recover - it leaves files which
were patched successfully and doesn't revert them to original.
Suppose a patch modifies files f1 and f2. f1 comes first, and is patched successfully. f2
fails because of lack of permissions (by the way, the exception which causes this should
appear in the log somewhere, but it doesn't!!).. f1 is not reverted back, because:
{noformat}
15:00:18,525 WARN [org.jboss.as.patching] (management-handler-thread - 4) failed to undo
change (org.jboss.as.patching.metadata.ContentModification@1e5bcf80):
java.io.FileNotFoundException:
/home/jmartisk/Workspace/jboss-eap/testsuite/integration/patching/target/jbossas/.installation/patches/aed03246-56a7-406b-9dd5-add81779d951/misc/f1
(No such file or directory)
at java.io.FileInputStream.open(Native Method) [rt.jar:1.7.0_25]
at java.io.FileInputStream.<init>(FileInputStream.java:138)
[rt.jar:1.7.0_25]
at
org.jboss.as.patching.runner.PatchContentLoader.openContentStream(PatchContentLoader.java:71)
[wildfly-patching-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at org.jboss.as.patching.runner.AbstractFileTask.apply(AbstractFileTask.java:91)
[wildfly-patching-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.patching.runner.AbstractPatchingTask.execute(AbstractPatchingTask.java:139)
[wildfly-patching-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.patching.runner.IdentityPatchContext.undoChanges(IdentityPatchContext.java:300)
[wildfly-patching-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.patching.runner.IdentityPatchContext.undoChanges(IdentityPatchContext.java:278)
[wildfly-patching-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.patching.runner.IdentityPatchContext.cleanup(IdentityPatchContext.java:142)
[wildfly-patching-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.patching.runner.IdentityPatchRunner.applyPatch(IdentityPatchRunner.java:86)
[wildfly-patching-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at org.jboss.as.patching.runner.PatchToolImpl.execute(PatchToolImpl.java:205)
[wildfly-patching-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at org.jboss.as.patching.runner.PatchToolImpl.applyPatch(PatchToolImpl.java:154)
[wildfly-patching-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.patching.management.LocalPatchOperationStepHandler.execute(LocalPatchOperationStepHandler.java:69)
[wildfly-patching-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440)
[wildfly-controller-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322)
[wildfly-controller-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:229)
[wildfly-controller-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:224)
[wildfly-controller-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:235)
[wildfly-controller-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:124)
[wildfly-controller-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:148)
[wildfly-controller-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:97)
[wildfly-controller-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:114)
[wildfly-controller-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:296)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:518)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
{noformat}
Test for this created as NonStandardSituationsTestCase#testWritePermissionDenied
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira