Red Hat Bugzilla – Bug 1284393
RELAX NG validation error when job XML has <hostRequires/> with force="" attribute and child elements
Last modified: 2015-11-23 23:26:36 EST
Description of problem:
When I clone recipe with following hostrequires:
<arch op="=" value="x86_64"/>
<cpu_count op=">" value="1"/>
<hypervisor op="=" value=""/>
Beaker complains with this error message:
Job failed schema validation. Please confirm that you want to submit it.
Line 21, col 0: Invalid attribute force for element hostRequires
Line 6, col 0: Invalid sequence in interleave
Line 6, col 0: Element recipe failed to validate content
Line 5, col 0: Element recipeSet failed to validate content
but according to beaker-job.rng "force" attribute should be allowed:
This element is a container for expressing constraints on the
system which will be selected to run this recipe.
Select a specific system by FQDN. This bypasses the
normal filtering mechanisms for selecting a system,
and always uses the named system regardless of its
current condition. No other filter criteria can be
specified when this attribute is used.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. try to clone recipe with hostrequires that has "force" attribute
Beaker validation error
clone should work without errors
The RELAX NG schema is written to only allow normal <hostRequires>...</hostRequires> *or* <hostRequires force=""/> with no child elements.
So what it's trying to warn you about here is the fact that you have <hostRequires force="">...</hostRequires> with both force="" attribute *and* child elements. The child elements have no effect when force="" is given.
The fact that the RELAX NG validation error is completely inscrutable and gives no hint about the real error, is an old known issue: bug 689338. We can't easily fix that because it comes from libxml2.
I guess this is either NOTABUG or dupe of 689338 depending on your point of view.