Bug 972417 - [ cmd_workflow ] clients and servers should be used together.
[ cmd_workflow ] clients and servers should be used together.
Product: Beaker
Classification: Community
Component: command line (Show other bugs)
Unspecified Unspecified
unspecified Severity low (vote)
: 0.13.x
: ---
Assigned To: Dan Callaghan
Depends On:
  Show dependency treegraph
Reported: 2013-06-09 05:26 EDT by Xin Zhang
Modified: 2018-02-05 19:41 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-10 22:44:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Xin Zhang 2013-06-09 05:26:32 EDT
Description of problem:
When running bkr workflow-simple --clients=<number> and bkr workflow-simple --servers=<number> separately, it will return errors; while running bkr workflow --clients=<number> --servers=<number>, it will execute successfully.

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

How reproducible:

Steps to Reproduce:
1.bkr workflow-simple --distro RHEL6.4-20130130.0 --task /distribution/install --clients=<number>
2.bkr workflow-simple --distro RHEL6.4-20130130.0 --task /distribution/install --servers=<number>
3.bkr workflow-simple --distro RHEL6.4-20130130.0 --task /distribution/install --clients=<number> --servers=<number>

Actual results:
Running 1&2 will return:
Traceback (most recent call last):
  File "/usr/bin/bkr", line 9, in <module>
    load_entry_point('bkr.client==0.12.1', 'console_scripts', 'bkr')()
  File "/usr/lib/python2.6/site-packages/bkr/client/main.py", line 49, in main
    return cmd.run(*cmd_args, **cmd_opts.__dict__)
  File "/usr/lib/python2.6/site-packages/bkr/client/commands/cmd_workflow_simple.py", line 110, in run
    for i in range(self.n_servers):
TypeError: range() integer end argument expected, got NoneType.

Running 3 will return:
Submitted:[ 'J:***' ]

Expected results:
When running 1&2, it will remind user that clients and servers should be used together.

Additional info:
Comment 1 Dan Callaghan 2013-06-17 02:35:18 EDT
I think it's perfectly valid to run without clients or servers. If I pass --clients=2 that just means I want 2 clients and no servers. So the default value for both options should be 0 (rather than None, which it is now, hence the TypeError).
Comment 2 Dan Callaghan 2013-06-17 02:45:04 EDT
On Gerrit: http://gerrit.beaker-project.org/2032
Comment 3 Dan Callaghan 2013-06-20 03:18:58 EDT
This bug fix is included in beaker-0.13.1-1.git.16.497fc35.el6, which is available for download here:

Comment 4 xjia 2013-06-20 09:06:11 EDT
[root@beaker-2 ~]# bkr workflow-simple --distro RHEL6.4-20130130.0 --task /distribution/install --servers=1
Submitted: ['J:640']
[root@beaker-2 ~]# bkr workflow-simple --distro RHEL6.4-20130130.0 --task /distribution/install --clients=1
Submitted: ['J:641']
[root@beaker-2 ~]# bkr workflow-simple --distro RHEL6.4-20130130.0 --task /distribution/install --clients=1 --servers=2
Submitted: ['J:642']
[root@beaker-2 ~]# rpm -qa | grep beaker
Comment 6 Amit Saha 2013-07-10 22:44:51 EDT
Beaker 0.13.2 has been released. (http://beaker-project.org/docs/whats-new/release-0.13.html#beaker-0-13-2).

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