Bug 883020 - malformed value for --hostrequire option causes traceback
Summary: malformed value for --hostrequire option causes traceback
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: 22.3
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-03 16:14 UTC by Jan Ščotka
Modified: 2016-04-04 05:34 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-04 05:34:58 UTC
Embargoed:


Attachments (Terms of Use)

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


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