NetDocuments-Archive / rd-winrm-plugin

Allows rundeck to execute commands with powershell
Apache License 2.0
31 stars 19 forks source link

Powershell and large exit return codes #18

Closed xeor closed 8 years ago

xeor commented 8 years ago

Sometimes, powershell returns very large exit statuses it seams. I am some times getting this error;

Process is terminated due to StackOverflowException.
/data/libext/cache/rd-winrm-plugin-1.3.2/winrmexe.rb:118:in `exit': integer 2147943401 too big to convert to `int' (RangeError)
    from /data/libext/cache/rd-winrm-plugin-1.3.2/winrmexe.rb:118:in `<main>'
.... powershell output ....
Failed: NonZeroResultCode: [WinRMexe] Result code: 1

I'm not sure what causes this, but after some googling after 2147943401, it looks like other people have had that error-code returned as well.

Ideas?

vvchik commented 8 years ago

Looks like this problem somewhere inside Microsoft DNA. Closed as not relevant to ruby and this plugin.

xeor commented 8 years ago

Thanks for the update @vvchik

But, is there anyway to instead of failing hard, fail a little more softly? Or give up and ignore the exit-code if it's "invalid"? Is it even invalid or just way to big? What about setting it to the max and log a warning?

This will bite many running jobs, and seams to happen just randomly... :(