rundeck / rundeck

Enable Self-Service Operations: Give specific users access to your existing tools, services, and scripts
http://rundeck.org
Apache License 2.0
5.55k stars 921 forks source link

Python commands not executing #7349

Closed sieuwe closed 3 years ago

sieuwe commented 3 years ago

Describe the bug After installation I tried running commands on my local node (rundeck server). whoami is working, but when I try python --version, I get Failed: NonZeroResultCode: Result code was 127.

My Rundeck detail

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Commands'
  2. Select local node
  3. Execute command 'python --version'
  4. Get error as output: Failed: NonZeroResultCode: Result code was 127 Execution failed: 16 in project Testproject: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [037aa67de279: NonZeroResultCode: Result code was 127 + {dataContext=MultiDataContextImpl(map={ContextView(node:037aa67de279)=BaseDataContext{{exec={exitCode=127}}}, ContextView(step:1, node:037aa67de279)=BaseDataContext{{exec={exitCode=127}}}}, base=null)} ]}, Node failures: {037aa67de279=[NonZeroResultCode: Result code was 127 + {dataContext=MultiDataContextImpl(map={ContextView(node:037aa67de279)=BaseDataContext{{exec={exitCode=127}}}, ContextView(step:1, node:037aa67de279)=BaseDataContext{{exec={exitCode=127}}}}, base=null)} ]}, status: failed]

Expected behavior Expected to see the python version that is installed on the docker image.

Additional information I was trying this to use the 'WinRM Node Executor Python' for running commands on a Windows node, but I got 'Failed: IOFailure: [WinRMPython] Cannot run program "python": error=2, No such file or directory' when I run 'whoami' on the Windows node.

MegaDrive68k commented 3 years ago

Hello @sieuwe,

Python isn't installed by default in the docker image, you need to extend the image to install it using RUN sudo apt-get install in the Dockerfile, take a look at this example.

Regards.

sieuwe commented 3 years ago

Hi @MegaDrive68k

I thought this was included because the Py WinRM plugin is included which needs python to work.