Executing inline script "failed to remove file" on cancel job

206 views
Skip to first unread message

javed...@gmail.com

unread,
Oct 2, 2020, 6:11:29 AM10/2/20
to rundeck-discuss
Hello,

Rundeck 3.3.1 on CentOS7
Target Node windows server 2012
File copier and job executioner plugin : py-winrm-plugin-2.0.7
Target Node for job is identified by Tags during execution.
----

In this setup, when I try to cancel a running job if executed by mistake, rundeck always fails to remove the temporary file.



The job continues to run in the background.The job is a python inline script. 

Here's the debug log of my cancellation:

---
[wf:a94a1c43-4411-4e96-883d-b821afb84c7d] Interrupted: Engine interrupted, stopping engine...
[wf:a94a1c43-4411-4e96-883d-b821afb84c7d] WillShutdown: Workflow engine shutting down (interrupted? true)
[wf:a94a1c43-4411-4e96-883d-b821afb84c7d] OperationFailed: operation failed: java.util.concurrent.CancellationException: Task was cancelled.
[WinRMPython] execCommand started, command: del C:\...\2402-231707-O365AEH3-dispatch-script.tmp.py
[WinRMPython] executing: [[${config.interpreter}, -u, /var/lib/rundeck/libext/cache/py-winrm-plugin-2.0.7/winrm-exec.py, ${node.hostname}]]
Failed to remove remote file: C:\...\2402-231707-O365AEH3-dispatch-script.tmp.py
Failed: Interrupted: [WinRMPython] null
[workflow] finishExecuteNodeStep(O365AEH3): NodeDispatch: Interrupted: [WinRMPython] null
1: Workflow step finished, result: Dispatch failed on 1 nodes: [O365AEH3: Interrupted: [WinRMPython] null + {dataContext=MultiDataContextImpl(map={}, base=null)} ]
[workflow] Finish step: 1,NodeDispatch
[wf:a94a1c43-4411-4e96-883d-b821afb84c7d] Complete: Workflow complete: [Step{stepNum=1, label='execute'}: CancellationException]
[wf:a94a1c43-4411-4e96-883d-b821afb84c7d] Cancellation while running step [1]
[workflow] Finish execution: node-first: [Workflow result: , Node failures: {O365AEH3=[]}, status: failed]
[Workflow result: , Node failures: {O365AEH3=[]}, status: failed]
Execution failed: 231707 in project O365_Extended_Toolkit: [Workflow result: , Node failures: {O365AEH3=[]}, status: failed]

javed...@gmail.com

unread,
Oct 2, 2020, 6:12:53 AM10/2/20
to rundeck-discuss

screenshot of the job file

rac...@rundeck.com

unread,
Oct 2, 2020, 8:30:52 AM10/2/20
to rundeck-discuss
Hi Javed,

I reproduced that behavior, good catch! We will follow this issue here.

Thanks for your feedback!

javed...@gmail.com

unread,
Dec 24, 2020, 6:00:02 PM12/24/20
to rundeck-discuss
Hiya, 

I have been tracking that issue reported but there seems to be no progress on it. 

Do you know if it's in the pipeline to be fixed?

Reply all
Reply to author
Forward
0 new messages