Bug 1181224

Summary: [TEST] (6.4.z) Patch applier writes invalid module xml when processing a patch that removes a module
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Alex Szczuczko <aszczucz>
Component: PatchingAssignee: Alexey Loubyansky <olubyans>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.2CC: aszczucz, bbaranow, bmaxwell, brian.stansberry, cdewolf, jason.greene, jawilson, jdoyle, kconner, msimka, olubyans
Target Milestone: CR1   
Target Release: EAP 6.4.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1235745    
Attachments:
Description Flags
Patch description included in the patch zip
none
Log of the server patch was applied to none

Description Alex Szczuczko 2015-01-12 16:00:17 UTC
Created attachment 979217 [details]
Patch description included in the patch zip

A test patch created for DV 6.1.0.ER4 (EAP 6.3.1) to DV 6.1.0.ER5 (EAP 6.3.2) removes one module in the dv layer. When this patch is applied to a 6.1.0.ER4 server, the process succeeds and requests a restart of the server. Upon start-up, the server attempts to load the module.xml for the removed module in the dv layer overlay created for the patch, and throws an exception:

org.jboss.modules.xml.XmlPullParserException: Missing one or more required attributes: target-name (position: START_TAG seen ...xmlns="urn:jboss:module:1.2" name="org.jboss.netty" slot="main" />... @2:82)

It appears that the server is unable to parse the XML that was written by the patch applier. It should successfully load the file and then know the overlay says to drop that module.

The full log and patch description are attached.

Comment 1 Alex Szczuczko 2015-01-12 16:01:17 UTC
Created attachment 979218 [details]
Log of the server patch was applied to

Comment 3 Dimitris Andreadis 2015-02-03 21:03:30 UTC
re-assign Emanuel's assigned bugs to Brian.

Comment 4 Alex Szczuczko 2015-06-03 11:34:44 UTC
This bug may now be affecting an actual patch, BZ-1213582 for DV 6.1.2.

Comment 6 Alexey Loubyansky 2015-06-10 13:35:00 UTC
This is a bug (misprint) in org.jboss.modules.ModuleXmlParser.parseModuleAbsentContents(...). It requires target-name attribute for no reason.
I verified that the patching code produces valid module-absent content.

Comment 7 Alex Szczuczko 2015-06-16 09:57:39 UTC
Alexey,

Thanks for looking into this.

Has a bug been filed with the broken component? Could you please set this bug's Depends On to include that bug please?

Comment 8 Alexey Loubyansky 2015-06-16 12:14:32 UTC
After MODULES-209 has been fixed, the release of jboss-modules with the fix will have to make it into the next WildFly and EAP versions.

Comment 9 JBoss JIRA Server 2015-06-16 12:17:23 UTC
David Lloyd <david.lloyd> updated the status of jira MODULES-209 to Resolved

Comment 15 Jan Martiska 2015-11-04 11:53:28 UTC
Verified in EAP 6.4.5.CR1.

Comment 16 Petr Penicka 2017-01-17 11:46:19 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

Comment 17 Petr Penicka 2017-01-17 11:46:26 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.