Bug 691666 - guestname attribute of guestrecipe should not be required in job xml
Summary: guestname attribute of guestrecipe should not be required in job xml
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: command line
Version: 0.5
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: 0.12
Assignee: Qixiang Wan
QA Contact: Raymond Mancy
URL:
Whiteboard: Misc
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-29 08:26 UTC by Jan Tluka
Modified: 2014-12-08 01:08 UTC (History)
8 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2013-04-11 04:57:16 UTC


Attachments (Terms of Use)
job xml (2.96 KB, text/xml)
2011-03-29 08:27 UTC, Jan Tluka
no flags Details

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.


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