Closed gtudan closed 3 years ago
Hi @gtudan
You're right. I see the same behavior:
plugin.yaml:
name: helloworld
version: 1.0
rundeckPluginVersion: 1.2
author: Warhawk
date: 01-02-2018 (ISO8601)
providers:
- name: helloworld
service: RemoteScriptNodeStep
title: HELLOWORLD
description: test of custom plugin
plugin-type: script
script-interpreter: /bin/bash
script-file: hello.config
script-args:
- name: bye
service: RemoteScriptNodeStep
title: BYE
description: another test of custom plugin
plugin-type: script
script-interpreter: /bin/bash
script-file: bye.config
script-args:
hello.config:
#!/usr/bin/env bash
echo "Hello World"
bye.config:
#!/usr/bin/env bash
echo "Bye"
Job Definition:
<joblist>
<job>
<defaultTab>nodes</defaultTab>
<description></description>
<executionEnabled>true</executionEnabled>
<id>bd899c76-3daa-4d46-aae9-c92945542e80</id>
<loglevel>INFO</loglevel>
<name>PluginTest</name>
<nodeFilterEditable>false</nodeFilterEditable>
<scheduleEnabled>true</scheduleEnabled>
<sequence keepgoing='false' strategy='node-first'>
<command>
<node-step-plugin type='helloworld' />
</command>
<command>
<node-step-plugin type='bye' />
</command>
</sequence>
<uuid>bd899c76-3daa-4d46-aae9-c92945542e80</uuid>
</job>
</joblist>
But doesn't affect the execution:
Thanks for yout feedback!
Hi Reiner,
Thanks for looking into this. I can share the script, but first I need to remove some project specifics from it.
I‘m pretty sure your example works because you set a script interpreter. This changes the execution behavior: not the script is executed, but the interpreter (with the script as argument). This is a good workaround but I‘m not sure if it‘s a fix in for every situation. Could you check if both scripts are executable in the cache dir?
Am 06.12.2019 um 15:06 schrieb Reiner notifications@github.com:
Hi @gtudan
Can you share the script content? I leave an example that works.
helloworld-plugin.zip
plugin.yaml:
name: helloworld version: 1.0 rundeckPluginVersion: 1.2 author: Warhawk date: 01-02-2018 (ISO8601) providers:
- name: helloworld service: RemoteScriptNodeStep title: HELLOWORLD description: test of custom plugin plugin-type: script script-interpreter: /bin/bash script-file: hello.config script-args:
- name: bye service: RemoteScriptNodeStep title: BYE description: another test of custom plugin plugin-type: script script-interpreter: /bin/bash script-file: bye.config script-args: hello.config:
!/usr/bin/env bash
echo "Hello World" bye.config:
!/usr/bin/env bash
echo "Bye" Job Definition:
nodes true bd899c76-3daa-4d46-aae9-c92945542e80 INFO PluginTest false true bd899c76-3daa-4d46-aae9-c92945542e80 Hope it helps!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
What’s the umask on the target server?
IIRC, you can set a umask to whatever suits you in Rundeck’s etc/profile, but if that doesn’t do it, then you may need to do so at the OS level.
Sent from a mobile device. Typos and probably bad ideas.
On Dec 7, 2019, at 10:26 AM, Gregor Tudan notifications@github.com wrote:
Hi Reiner,
Thanks for looking into this. I can share the script, but first I need to remove some project specifics from it.
I‘m pretty sure your example works because you set a script interpreter. This changes the execution behavior: not the script is executed, but the interpreter (with the script as argument). This is a good workaround but I‘m not sure if it‘s a fix in for every situation. Could you check if both scripts are executable in the cache dir?
Am 06.12.2019 um 15:06 schrieb Reiner notifications@github.com:
Hi @gtudan
Can you share the script content? I leave an example that works.
helloworld-plugin.zip
plugin.yaml:
name: helloworld version: 1.0 rundeckPluginVersion: 1.2 author: Warhawk date: 01-02-2018 (ISO8601) providers:
- name: helloworld service: RemoteScriptNodeStep title: HELLOWORLD description: test of custom plugin plugin-type: script script-interpreter: /bin/bash script-file: hello.config script-args:
- name: bye service: RemoteScriptNodeStep title: BYE description: another test of custom plugin plugin-type: script script-interpreter: /bin/bash script-file: bye.config script-args: hello.config:
!/usr/bin/env bash
echo "Hello World" bye.config:
!/usr/bin/env bash
echo "Bye" Job Definition:
nodes true bd899c76-3daa-4d46-aae9-c92945542e80 INFO PluginTest false true bd899c76-3daa-4d46-aae9-c92945542e80 Hope it helps!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi @gtudan
I changed my post and I see the same behavior.
Take a look:
https://github.com/rundeck/rundeck/issues/5568#issuecomment-562584375
@MegaDrive68k Good to hear that it's reproducible. Execution still works because you defined an interpreter. Try removing it and see what happens.
Having an interpreter is a perfectly legit workaround for scripts, but won't work for binaries.
In an effort to focus on bugs and issues that impact currently supported versions of Rundeck, we have elected to notify GitHub issue creators if their issue is classified as stale and close the issue. An issue is identified as stale when there have been no new comments, responses or other activity within the last 12 months. If a closed issue is still present please feel free to open a new Issue against the current version and we will review it. If you are an enterprise customer, please contact your Rundeck Support to assist in your request. Thank you, The Rundeck Team
Confirming this is still an issue in version 3.3.12, and the suggested workaround (setting script-interpreter
) works.
Describe the bug If a Plugin contains more than one script-providers than not all get the executable flag. Executing those scripts will fail at runtime.
My Rundeck detail
To Reproduce Steps to reproduce the behavior:
name: rundeck-ldap-options-plugin version: 1.0 rundeckPluginVersion: 1.2 author: Gregor Tudan date: 2019-10-05 providers:
Expected behavior All scripts are executable. The actual result is that only one of the scripts will have the executable flag (which one seems to be random).