rundeck-plugins / py-winrm-plugin

15 stars 21 forks source link

"Failed to remove remote file" when killing an inline-script job #66

Open MegaDrive68k opened 4 years ago

MegaDrive68k commented 4 years ago

If you kill a job with an inline-script always appears "Failed to remove remote file". I reproduced the issue with the following Job Definition:

<joblist>
  <job>
    <defaultTab>nodes</defaultTab>
    <description></description>
    <dispatch>
      <excludePrecedence>true</excludePrecedence>
      <keepgoing>false</keepgoing>
      <rankOrder>ascending</rankOrder>
      <successOnEmptyNodeFilter>false</successOnEmptyNodeFilter>
      <threadcount>1</threadcount>
    </dispatch>
    <executionEnabled>true</executionEnabled>
    <id>2cdcadd1-b975-4600-9dcd-837440f3534e</id>
    <loglevel>INFO</loglevel>
    <name>HelloWorldPY</name>
    <nodeFilterEditable>false</nodeFilterEditable>
    <nodefilters>
      <filter>name: windows</filter>
    </nodefilters>
    <nodesSelectedByDefault>true</nodesSelectedByDefault>
    <plugins />
    <scheduleEnabled>true</scheduleEnabled>
    <sequence keepgoing='false' strategy='node-first'>
      <command>
        <fileExtension>.py</fileExtension>
        <script><![CDATA[import time

time.sleep(5)
print("Hello World")]]></script>
        <scriptargs />
        <scriptinterpreter>C:\Users\user\AppData\Local\Programs\Python\Python38\python.exe</scriptinterpreter>
      </command>
    </sequence>
    <uuid>2cdcadd1-b975-4600-9dcd-837440f3534e</uuid>
  </job>
</joblist>

Screenshot:

Screenshot_1

Original issue: https://groups.google.com/g/rundeck-discuss/c/fL5hmE84njk

oj43085 commented 4 years ago

Hello,

@MegaDrive68k Is there any progress on this issue? The problem is not just a visual bug, the file may or may not get removed from the endpoint but the process continues to run if you check services.msc on windows node and have to manually kill the process.

smaddock commented 2 years ago

We're running into this a lot with one particular node. We're not manually killing it but after the inline script finishes executing, the job hangs for 6.5 minutes exactly then we get the "Failed to remove remote file" message.

LevonW-IIS commented 1 year ago

I've encountered this as well and is a super frustrating bug