| Summary: | [pre-ER1] Failure to undo a patching process which fails | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Jan Martiska <jmartisk> |
| Component: | Patching | Assignee: | Emanuel Muckenhuber <emuckenh> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jan Martiska <jmartisk> |
| Severity: | unspecified | Docs Contact: | Russell Dickenson <rdickens> |
| Priority: | unspecified | ||
| Version: | 6.2.0 | CC: | dandread, jason.greene, jawilson, jdoyle, kconner, olubyans |
| Target Milestone: | ER1 | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-12-15 17:01:57 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: | |
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.