Bug 691666

Summary: guestname attribute of guestrecipe should not be required in job xml
Product: [Retired] Beaker Reporter: Jan Tluka <jtluka>
Component: command lineAssignee: Qixiang Wan <qwan>
Status: CLOSED CURRENTRELEASE QA Contact: Raymond Mancy <rmancy>
Severity: medium Docs Contact:
Priority: medium    
Version: 0.5CC: bpeck, dcallagh, ebaak, llim, mcsontos, qwan, rmancy, stl
Target Milestone: 0.12   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Misc
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-11 04:57:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
job xml none

Description Jan Tluka 2011-03-29 08:26:13 UTC
Description of problem:
Using attached job xml results in failure during validation of xml.
The problem is guestname attribute that is required.

<guestrecipe guestargs="--hvm">
</guestrecipe>

This results in:
WARNING: job xml validation failed: Invalid sequence in interleave

Adding guestname arg (even empty) resolves the issue.
<guestrecipe guestname="" guestargs="--hvm">
</guestrecipe>


Version-Release number of selected component (if applicable):
beaker-client-0.5.63-1.fc14.noarch

How reproducible:
Everytime, using the attached xml.
 
Actual results:
Failed to submit job using bkr command line tool.

Expected results:
Job defined in xml file is submitted.

Comment 1 Jan Tluka 2011-03-29 08:27:01 UTC
Created attachment 488370 [details]
job xml

Comment 2 Marian Csontos 2011-04-07 09:05:12 UTC
To be more precise it results in:

  WARNING: job xml validation failed: Invalid sequence in interleave
  <Fault 1: 'exceptions.KeyError:'>

The warning itself is harmless and in this case it pinpoints the problem - the KeyError message does not help much.

Comment 3 Nick Coghlan 2012-10-17 04:39:57 UTC
Bulk reassignment of issues as Bill has moved to another team.

Comment 4 Dan Callaghan 2012-10-24 03:33:15 UTC
Note that if the guestname is not supplied (ignoring the validation errors) it will appear in the recipe XML (and therefore to beah and /distribution/virt/install) as the literal 'None' which can lead to duplicate guest names in a multihost test.

Comment 5 Nick Coghlan 2012-12-03 07:15:39 UTC
Dan, given the changes to guest recipes in 0.10, isn't this a fairly trivial fix now?

Comment 6 Dan Callaghan 2012-12-05 04:52:55 UTC
Yes we can support empty guestname easily. There are obviously lots of people using it in spite of the validation warnings (e.g. bug 880983).

There are probably just two things needed here: updating the RELAX NG schema to make the guestname attribute optional, and making sure when it is omitted that we store and return sensible values everywhere ("" instead of "None" as in comment 4).

Comment 7 Qixiang Wan 2013-01-23 08:16:48 UTC
On Gerrit:
http://gerrit.beaker-project.org/#/c/1666/

Comment 10 Dan Callaghan 2013-04-11 04:57:16 UTC
Beaker 0.12 has been released.