#240 ✓resolved
Alex-SF

Customizable dispatch plugin

Reported by Alex-SF | March 21st, 2011 @ 08:00 AM | in Rundeck 1.3 (closed)

Define a generic programming interface representing node execution and file copying that will allow the replacement of the current ssh/scp implementation by user developed plugins.

User-developed plugins will provide implementations for the node execution and file copying methods specific to the underlying tool, transport or mechanism. The existing ssh/scp implementation will be refactored as one such plugin. A second plugin will support the execution of scripts.

Plugins will be driven primarily from data exposed to them in their execution context (resource, job, option data).

Refactor the core framework to use a plugin manager that resolves and invokes the needed plugin. The framework will have a default plugin setting, specifying the ssh/scp implementation for backwards compatibility.

Comments and changes to this ticket

  • Greg Schueler

    Greg Schueler April 5th, 2011 @ 11:44 AM

    • State changed from “new” to “open”
    • Assigned user set to “Greg Schueler”
    • Milestone order changed from “12” to “0”
  • Deleted User
  • Deleted User

    Deleted User May 24th, 2011 @ 03:32 PM

    • Milestone order changed from “1” to “0”
  • Alex-SF

    Alex-SF June 8th, 2011 @ 10:46 AM

    • State changed from “open” to “needs_verification”
  • Alex-SF

    Alex-SF June 8th, 2011 @ 11:14 AM

    • Tag set to feature request
  • Moses Lei

    Moses Lei July 8th, 2011 @ 12:37 PM

    I attempted to use script-exec to provide the closest OpenSSH analogue to the current behavior of the jsch plugin.

    Using this resources.yaml:

    centos5.local:
        hostname: centos5.local
        username: mlei
        node-executor: script-exec
        script-exec: ssh -o "StrictHostKeyChecking no" ${node.username}@${node.hostname} ${script-exec.command}
    

    I get this message:

    12:35:41 [null@centos5.local  1-exec][SEVERE] command-line: line 0: Bad configuration option: "StrictHostKeyChecking
    12:35:41 [null@null null null][SEVERE] Execution failed on the following 1 nodes: {centos5.local=[Workflow results: {centos5.local=[[script-exec] success: false, result code: 255]}, failures: {centos5.local=[[script-exec] success: false, result code: 255]}: exception: com.dtolabs.rundeck.core.execution.workflow.WorkflowStepFailureException: Step 1 of the workflow failed with result: DispatcherResult{status=false, results={centos5.local=[script-exec] success: false, result code: 255}}]}
    

    Some kind of argument splitting is happening here that shouldn't be...

  • Moses Lei

    Moses Lei July 8th, 2011 @ 12:42 PM

    With this resources.yaml:

    centos5.local:
        hostname: centos5.local
        username: mlei
        node-executor: script-exec
        script-exec: ssh ${node.username}@${node.hostname} ${script-exec.command}
    

    I get:

    12:39:58 [null@centos5.local  1-exec][SEVERE] bash: exec.command: command not found
    12:39:58 [null@null null null][SEVERE] Execution failed on the following 1 nodes: {centos5.local=[Workflow results: {centos5.local=[[script-exec] success: false, result code: 127]}, failures: {centos5.local=[[script-exec] success: false, result code: 127]}: exception: com.dtolabs.rundeck.core.execution.workflow.WorkflowStepFailureException: Step 1 of the workflow failed with result: DispatcherResult{status=false, results={centos5.local=[script-exec] success: false, result code: 127}}]}
    
  • Moses Lei

    Moses Lei July 8th, 2011 @ 03:22 PM

    • Tag changed from feature request to feature request, documentation
    • State changed from “needs_verification” to “open”

    I got it to work with this:

    centos5.local:
        hostname: centos5.local
        username: mlei
        node-executor: script-exec
        script-exec: ssh ${node.username}@${node.hostname} ${exec.command}
    

    Documentation needs to be fixed to say "exec.command" instead of "script-exec" command.

  • Moses Lei

    Moses Lei July 8th, 2011 @ 03:41 PM

    Testing script-copy, this also failed:

    centos5.local:
        hostname: centos5.local
        username: mlei
        node-executor: script-exec
        script-exec: ssh ${node.username}@${node.hostname} ${exec.command}
        file-copier: script-copy
        destdir: /tmp
        script-copy: scp ${file-copy.file} ${node.username}@${node.hostname}:${node.destdir}
    

    This job fails with no output:

    - id: 76b66d5d-cf68-406f-9159-341b1f120888
      project: test
      loglevel: INFO
      sequence:
        keepgoing: false
        strategy: node-first
        commands:
        - script: uname -a
      description: ''
      name: testjob2
      uuid: 76b66d5d-cf68-406f-9159-341b1f120888
      nodefilters:
        dispatch:
          threadcount: 1
          keepgoing: false
          excludePrecedence: true
        include:
          name: centos5.local
    

    You can't even download the output of this execution, it gives you a 404.

  • Deleted User
  • Deleted User

    Deleted User July 13th, 2011 @ 06:29 PM

    • State changed from “open” to “needs_verification”
    • Milestone order changed from “2” to “0”

    (from [df27a039f07993135acb8bfbe7a4e203d07e3b1c]) Update script plugin and docs to support shell execution option, and alternate filepath declaration for script-copy

    [#240 state:needs_verification] https://github.com/dtolabs/rundeck/commit/df27a039f07993135acb8bfbe...

  • Greg Schueler

    Greg Schueler July 15th, 2011 @ 10:34 AM

    committed change to fix the no-output issue

  • Alex-SF

    Alex-SF July 15th, 2011 @ 11:46 AM

    • State changed from “needs_verification” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues

Shared Ticket Bins

Referenced by

Pages