Bug 883020

Summary: malformed value for --hostrequire option causes traceback
Product: [Retired] Beaker Reporter: Jan Ščotka <jscotka>
Component: command lineAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 22CC: bnater, dcallagh, dowang, mcermak, mfrodl, mjia, rjoost
Target Milestone: 22.3Keywords: Patch, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-04 05:34:58 UTC 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:

Comment 4 Dan Callaghan 2016-03-08 03:06:16 UTC
When a bkr workflow command is passed --hostrequire with a value that does not meet the expected format (TAG OPERATOR VALUE) it produces a traceback:

$ bkr workflow-simple --distro=RHEL-7.2 --task=/distribution/reservesys --hostrequire=fqdn.example.com
Traceback (most recent call last):
  File "/usr/bin/bkr", line 9, in <module>
    load_entry_point('bkr.client==22.1', 'console_scripts', 'bkr')()
  File "/usr/lib/python2.7/site-packages/bkr/client/main.py", line 72, 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 106, in run
    recipeTemplate.addBaseRequires(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/bkr/client/__init__.py", line 768, in addBaseRequires
    self._addBaseHostRequires(**kwargs)
  File "/usr/lib/python2.7/site-packages/bkr/client/__init__.py", line 747, in _addBaseHostRequires
    key, op, value = p2.split(require,3)
ValueError: need more than 1 value to unpack

It should show a more descriptive error message instead.

Comment 5 Dan Callaghan 2016-03-17 07:48:08 UTC
http://gerrit.beaker-project.org/4742

Comment 6 Dan Callaghan 2016-03-18 01:17:34 UTC
This bug fix is included in beaker-client-22.3-0.git.5.a4291ca which is available for download here:

https://beaker-project.org/nightlies/release-22/

Comment 8 Roman Joost 2016-04-04 05:34:58 UTC
Beaker 22.3 has been released. Release Notes can be found here: https://beaker-project.org/docs/whats-new/release-22.html#beaker-22-3