Bug 1008913 - [pre-ER1] Failure to undo a patching process which fails
Summary: [pre-ER1] Failure to undo a patching process which fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Patching
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER1
: ---
Assignee: Emanuel Muckenhuber
QA Contact: Jan Martiska
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-17 10:34 UTC by Jan Martiska
Modified: 2015-02-01 23:05 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-15 17:01:57 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-1803 0 Major Closed Failure to undo a patching process which fails 2015-10-15 13:47:52 UTC

Description Jan Martiska 2013-09-17 10:34:40 UTC
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:

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)

This is fixed in ER1, just cloning the issue for reference.


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