Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Customizable dispatch plugin

#240

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.

Reported by Alex-SF · March 21st, 2011 @ 08:00 AM

State: open
Milestone: Rundeck 1.3
Assigned to: Greg Schueler Greg Schueler

Activity

  1. Greg Schueler
    Greg Schueler
    • State changed from new to open
    • Assigned user set to Greg Schueler
    • Milestone order changed from 12 to 0

    April 5th, 2011 @ 11:44 AM

  2. Deleted User
  3. Deleted User
  4. Alex-SF
    Alex-SF
    • State changed from open to needs_verification

    June 8th, 2011 @ 10:46 AM

  5. Alex-SF
    Alex-SF
    • Tag set to feature request

    June 8th, 2011 @ 11:14 AM

  6. Moses Lei
    Moses Lei

    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...

    July 8th, 2011 @ 12:37 PM

  7. Moses Lei
    Moses Lei

    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}}]}
    

    July 8th, 2011 @ 12:42 PM

  8. Moses Lei
    Moses Lei
    • State changed from needs_verification to open
    • Tag changed from feature request to feature request, documentation

    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.

    July 8th, 2011 @ 03:22 PM

  9. Moses Lei
    Moses Lei

    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.

    July 8th, 2011 @ 03:41 PM

  10. Deleted User
  11. Deleted User
    Deleted User
    • 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 Customizable dispatch plugin state:needs_verification] https://github.com/dtolabs/rundeck/commit/df27a039f07993135acb8bfbe...

    July 13th, 2011 @ 06:29 PM

  12. Greg Schueler
    Greg Schueler

    committed change to fix the no-output issue

    July 15th, 2011 @ 10:34 AM

  13. Alex-SF
    Alex-SF
    • State changed from needs_verification to resolved

    July 15th, 2011 @ 11:46 AM

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.