Description of problem: In my test, If I cancel a task with invalid task NO. it will also successful complete. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1.Create a job and wait it in running status. Suppose there is a task NO. T:123456 2. Cancel this task like this "bkr job-cancel T:123456qwe" 3. Actual results: This job can be canceled successful complete. Expected results: It should return "XML-RPC fault: <class 'bkr.common.bexceptions.BX'>:Invalid T 123456qwe" Additional info: Also can we add we can cancel Task in "bkr job-cancel" command. From now if I type this command --> "bkr job-cancel --help" It will return """ [wangdong@localhost ~]$ bkr job-cancel --help Usage: bkr job-cancel [options] [J:<id> | RS:<id> ...] Options: --hub=URL Connect to Beaker server at URL (overrides config file) --username=USERNAME Use USERNAME for password authentication (overrides config file) --password=PASSWORD Use PASSWORD for password authentication (overrides config file) --version show program's version number and exit -h, --help show this help message and exit --msg=MSG Optional message to record as to why you cancelled """ I think we can tip user it can cancel a task.
Dear Wang Dong, I've tried to reproduce this problem today, but get: $ bkr job-cancel T:283829393 XML-RPC fault: <class 'bkr.common.bexceptions.BX'>:Invalid T 283829393 where T:283829393 is a task which doesn't exist. Do you still have this problem?
Dear Roman After my reproduce it again. Run command: [dowang@dhcp-136-186 ~]$ bkr job-cancel T:99999q Cancelled T:99999q Capture in server-debug.log: _______________________________________________ Oct 13 05:56:44 beaker-devel.app.eng.bos.redhat.com beaker-server[11324]: [error] /usr/lib64/python2.6/site-packages/sqlalchemy/engine/default.py:324: Warning: Truncated incorrect DOUBLE value: '99999q' Oct 13 05:56:44 beaker-devel.app.eng.bos.redhat.com beaker-server[11324]: [error] cursor.execute(statement, parameters) Oct 13 05:56:44 beaker-devel.app.eng.bos.redhat.com beaker-server[11324]: bkr.server.xmlrpccontroller DEBUG Time: 0:00:00.030048 taskactions.stop ('T:99999q', 'cancel', None) _______________________________________________ In above test Beaker throw a error can't handle DOUBLE value But in below test I found make job-cancel can't handle Task ID contains letter [dowang@dhcp-136-186 ~]$ bkr job-cancel T:139203 Cancelled T:139203 [dowang@dhcp-136-186 ~]$ bkr job-cancel T:139206 XML-RPC fault: <class 'bkr.common.bexceptions.BX'>:Invalid T 139206 [dowang@dhcp-136-186 ~]$ bkr job-cancel T:139203w Cancelled T:139203w [dowang@dhcp-136-186 ~]$ bkr job-cancel T:w139203 XML-RPC fault: <class 'bkr.common.bexceptions.BX'>:Invalid T w139203 [dowang@dhcp-136-186 ~]$ bkr job-cancel T:1w39203 Cancelled T:1w39203 I will try to hanle this bug.
I managed to reproduce this bug. You may have also not noticed that upon completing the steps described for example $ bkr job-cancel T:99999q Cancelled T:99999q if you run the exact command again, and the T has been cancelled (and is displaying in the webUI as cancelled) you get $ bkr job-cancel T:99999q Cancelled T:99999q Surely it should report that the task no longer exists.
On Gerrit: https://gerrit.beaker-project.org/#/c/5322/
on gerrit: https://gerrit.beaker-project.org/#/c/5563/
Verified this issue. The result is PASS. Version: Beaker 24.0.git.241.4eb2414 details: $ bkr job-cancel T:9q9999q XML-RPC fault: <class 'bkr.common.bexceptions.BX'>:Invalid T 9q9999q
Beaker 24.0 has been released.