Bug 999733 - cannot cancel recipe sets over XML-RPC: NameError: global name 'self' is not defined
cannot cancel recipe sets over XML-RPC: NameError: global name 'self' is not ...
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: scheduler (Show other bugs)
0.14
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.14.2
: ---
Assigned To: Nick Coghlan
Amit Saha
: Regression, Reopened
: 1012345 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-21 20:48 EDT by Dan Callaghan
Modified: 2018-02-05 19:41 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-06 20:47:11 EST
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 Dan Callaghan 2013-08-21 20:48:02 EDT
Description of problem:
Cannot cancel at the recipe set level over XML-RPC (or using bkr client).

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

Steps to Reproduce:
1. Cancel a recipe set using bkr: bkr job-cancel RS:1234

Actual results:
XML-RPC fault: <type 'exceptions.NameError'>:global name 'self' is not defined

Expected results:
Recipe set is cancelled.

Additional info:

Aug 22 00:33:29 beaker-02 beaker-server[19870]: bkr.server.xmlrpccontroller ERROR Error handling XML-RPC method
Aug 22 00:33:29 beaker-02 beaker-server[19870]:  Traceback (most recent call last):
Aug 22 00:33:29 beaker-02 beaker-server[19870]:    File "/usr/lib/python2.6/site-packages/bkr/server/xmlrpccontroller.py", line 54, in RPC2
Aug 22 00:33:29 beaker-02 beaker-server[19870]:      response = self.process_rpc(method,params)
Aug 22 00:33:29 beaker-02 beaker-server[19870]:    File "/usr/lib/python2.6/site-packages/bkr/server/xmlrpccontroller.py", line 43, in process_rpc
Aug 22 00:33:29 beaker-02 beaker-server[19870]:      response = obj(*params)
Aug 22 00:33:29 beaker-02 beaker-server[19870]:    File "<string>", line 3, in stop
Aug 22 00:33:29 beaker-02 beaker-server[19870]:    File "/usr/lib/python2.6/site-packages/turbogears/identity/conditions.py", line 249, in require
Aug 22 00:33:29 beaker-02 beaker-server[19870]:      return fn(self, *args, **kwargs)
Aug 22 00:33:29 beaker-02 beaker-server[19870]:    File "/usr/lib/python2.6/site-packages/bkr/server/task_actions.py", line 104, in stop
Aug 22 00:33:29 beaker-02 beaker-server[19870]:      if not task.can_stop(identity.current.user):
Aug 22 00:33:29 beaker-02 beaker-server[19870]:    File "/usr/lib/python2.6/site-packages/bkr/server/model.py", line 5034, in can_stop
Aug 22 00:33:29 beaker-02 beaker-server[19870]:      return self.job.can_stop(user)
Aug 22 00:33:29 beaker-02 beaker-server[19870]:  NameError: global name 'self' is not defined

Typo in RecipeSet.can_stop, has sel as the first arg (instead of self).
Comment 2 Nick Coghlan 2013-09-10 23:53:03 EDT
Fixed as part of http://gerrit.beaker-project.org/#/c/2222
Comment 4 xjia 2013-09-17 22:12:57 EDT
Verify:
[root@dhcp-65-87 ~]# bkr job-cancel RS:2457
Cancelled RS:2457
[root@dhcp-65-87 ~]# bkr job-cancel RS:2457
Cancelled RS:2457

Version;
[root@dhcp-65-87 ~]# rpm -qa | grep beaker
beaker-redhat-0.1.54-1.el6eng.noarch
beaker-0.14.1-1.git.180.8e142cb.el6eng.noarch
beaker-lab-controller-addDistro-0.14.1-1.git.180.8e142cb.el6eng.noarch
python-beaker-1.3.1-6.el6.noarch
beaker-client-0.14.1-1.git.180.8e142cb.el6eng.noarch
beaker-lab-controller-0.14.1-1.git.180.8e142cb.el6eng.noarch
beaker-server-0.14.1-1.git.180.8e142cb.el6eng.noarch
Comment 5 xjia 2013-09-26 07:30:57 EDT
*** Bug 1012345 has been marked as a duplicate of this bug. ***
Comment 6 Nick Coghlan 2013-10-02 22:29:00 EDT
Beaker 0.15 has been released.
Comment 7 Raymond Mancy 2013-10-22 21:57:00 EDT
This change has been nominated to be back ported to the 0.14 branch, to be released as part of the next maintenance release 0.14.2.
Comment 8 Nick Coghlan 2013-10-25 03:08:56 EDT
Adjusting target milestone to make the changes backported to 0.14.2 easier to identify. 0.15.0 has enough significant regressions that it shouldn't be used, so the change means that 0.15.1 can be effectively reidentified as the union of that tag and the 0.14.2 target milestone.
Comment 11 Nick Coghlan 2013-10-28 23:18:47 EDT
Initial set of backports missed the actual fix for this. Missing commit cherry picked here:

http://gerrit.beaker-project.org/#/c/2425
Comment 14 Nick Coghlan 2013-11-06 20:47:11 EST
Closing as addressed in Beaker 0.14.2.

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