This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1014693 - hostrequire should not process args other than verify it is valid xml.
hostrequire should not process args other than verify it is valid xml.
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: command line (Show other bugs)
0.14
Unspecified Unspecified
unspecified Severity low (vote)
: 0.17
: ---
Assigned To: Dan Callaghan
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-02 10:38 EDT by Bill Peck
Modified: 2014-06-10 19:28 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-10 19:28:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Peck 2013-10-02 10:38:44 EDT
Description of problem:
Change --hostrequire to simply pass its argument as a child to <hostRequire>

Currently it's impossible to pass a requirement on <device/> from the command line.

Version-Release number of selected component (if applicable):
0.14.1

How reproducible:


Steps to Reproduce:
1. bkr workflow-simple --dryrun --distro rhel-6.4 --arch x86_64 --variant Server --hostrequire "<device/>" --task /distribution/reservesys

Actual results:
Traceback (most recent call last):
  File "/usr/bin/bkr", line 9, in <module>
    load_entry_point('bkr.client==0.14.1', 'console_scripts', 'bkr')()
  File "/usr/lib/python2.7/site-packages/bkr/client/main.py", line 50, in main
    return cmd.run(*cmd_args, **cmd_opts.__dict__)
  File "/usr/lib/python2.7/site-packages/bkr/client/commands/cmd_workflow_simple.py", line 101, in run
    recipeTemplate.addBaseRequires(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/bkr/client/__init__.py", line 634, in addBaseRequires
    key, op, value = p2.split(require,3)


Expected results:
pass the valid xml through to the job xml.
Comment 2 Dan Callaghan 2013-10-02 19:40:48 EDT
We would need to continue supporting the existing usage of --hostrequires though, which doesn't work for <device/> but does work for most other XML filters.

We could probably pass the value through directly if it begins with <, otherwise use the existing operator parsing logic.
Comment 3 Nick Coghlan 2013-10-02 21:50:53 EDT
Dan's suggested approach sounds good to me (and relatively straightforward).
Comment 5 Dan Callaghan 2014-05-08 01:21:02 EDT
On Gerrit: http://gerrit.beaker-project.org/3073
Comment 9 Dan Callaghan 2014-06-02 00:39:56 EDT
This bug fix has been applied to the release-0.16 branch, however we have elected not to do another maintenance release of the 0.16.x series. This fix will be included in 0.17.0 instead.
Comment 10 Dan Callaghan 2014-06-10 19:28:05 EDT
Beaker 0.17.0 has been released.

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