Bug 966292

Summary: cannot close accounts over XML-RPC
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: web UIAssignee: Amit Saha <asaha>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.12CC: aigao, asaha, dcallagh, ebaak, kbaker, llim, qwan, rmancy, xjia
Target Milestone: 0.15   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-03 02:28:55 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:
Bug Depends On:    
Bug Blocks: 554806    

Description Dan Callaghan 2013-05-22 23:58:18 UTC
There is supposed to be an XML-RPC call, users.close_account, to remove a user's account but it's not documented, and it doesn't work:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/site-packages/kobo/xmlrpc.py", line 403, in request
    result = transport_class.request(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/kobo/xmlrpc.py", line 259, in _request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 1: "<type 'exceptions.AssertionError'>:method users does not exist">

It probably just needs this set to True in users.py:

class Users(AdminPage):
    # For XMLRPC methods in this class.
    exposed = False

Comment 2 Amit Saha 2013-09-09 04:40:10 UTC
The fix to this bug will add a new client command to close the accounts as well.

Comment 3 Amit Saha 2013-09-09 06:12:22 UTC
On Gerrit: http://gerrit.beaker-project.org/#/c/2221/1

Comment 4 Nick Coghlan 2013-09-09 07:09:54 UTC
*** Bug 584503 has been marked as a duplicate of this bug. ***

Comment 5 Amit Saha 2013-09-10 09:25:07 UTC
While implementing the fix to this patch, it was found that jobs were not being cancelled upon account closure. This will be fixed in patch: http://gerrit.beaker-project.org/#/c/2227/

Thus, when verifying this bug, two things should be verified:

1. The sub-command, close-account 
2. Also, any existing jobs that were running should be cancelled.

Comment 6 Amit Saha 2013-09-12 04:13:54 UTC
(In reply to Amit Saha from comment #5)
> While implementing the fix to this patch, it was found that jobs were not
> being cancelled upon account closure. This will be fixed in patch:
> http://gerrit.beaker-project.org/#/c/2227/
> 
> Thus, when verifying this bug, two things should be verified:
> 
> 1. The sub-command, close-account 

The subcommand was renamed to remove-account

Comment 7 Amit Saha 2013-09-12 06:12:17 UTC
http://gerrit.beaker-project.org/#/c/2221/1 is merged.

Once the second patch is merged, this will move to MODIFIED.

Comment 10 Nick Coghlan 2013-10-03 02:28:55 UTC
Beaker 0.15 has been released.