Dynamically determine target nodes before running a job

471 views
Skip to first unread message

Phil Austin

unread,
Jan 21, 2014, 5:55:43 PM1/21/14
to rundeck...@googlegroups.com
I posted on this before but got crickets.  Reading back, my post was overly-verbose and potentially confusing.


My question is:  Is there a way to dynamically determine which nodes to run a job against before running the job?  If not, is there just a way to simply not fail the job if certain nodes are offline?


Reason:  I actually don't care if a certain subset of nodes are down when the job runs.  I have a cluster of nodes in AWS that spin up or down depending on the amount of work to be done.  I just want to hit the nodes that are online at the time.  Seems like this might not be an unheard-of scenario.


Thanks!

Phil

Alex Honor

unread,
Jan 21, 2014, 8:46:10 PM1/21/14
to rundeck...@googlegroups.com
Hi Phil,

Curious if you are using or are aware of the ec2-nodes-provider plugin. That plugin should return just the nodes that are running. Assuming the rundeck job is written to filter nodes by tags  (and not explicit names), jobs should only run against nodes that are online.

Thanks

From: Phil Austin <austi...@gmail.com>
To: rundeck...@googlegroups.com
Sent: Tuesday, January 21, 2014 2:55 PM
Subject: [rundeck] Dynamically determine target nodes before running a job

--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


kcd

unread,
Jan 23, 2014, 7:15:39 PM1/23/14
to rundeck...@googlegroups.com, Alex Honor
Hi Phil

You can do both. As well as dynamic nodes you could turn dispatch keepgoing to true

<dispatch>
      <keepgoing>true</keepgoing>


Not to be confused with the step equivalent
<sequence keepgoing="true" strategy="node-first">

Phil Austin

unread,
Jan 24, 2014, 4:02:37 PM1/24/14
to rundeck...@googlegroups.com
Thanks Alex, I'll checkout the ec2 nodes provider plugin.  I was not aware that was an option.  Kcd, dispatch keep going will still fail the job.  Looking for a solution that won't fail the job if a machine is offline, but rather just move onto the next node and if all online nodes complete the job should be successful.

Thanks.

Kevin Dyer

unread,
Jan 26, 2014, 1:29:29 PM1/26/14
to rundeck...@googlegroups.com
I missed that point yes, the job will run on all nodes but show failures and be marked as failed


--
You received this message because you are subscribed to a topic in the Google Groups "rundeck-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rundeck-discuss/R-lPmqLp6Qw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rundeck-discu...@googlegroups.com.

Denis Treskunov

unread,
Feb 8, 2014, 8:19:38 PM2/8/14
to rundeck...@googlegroups.com
The workflow can skip offline nodes and report success at completion if the only failures are ConnectionFailures when you add an a "Local Command" error handler that inspects the "result.reason" context variable, for example:

- id: 2811ecd9-c813-4829-b3f8-2ead9df39eb6
  project: dev_one
  loglevel: INFO
  sequence:
    keepgoing: false
    strategy: node-first
    commands:
    - exec: whoami
      errorhandler:
        type: localexec
        nodeStep: true
        configuration:
          command: test ${result.reason} = ConnectionFailure
        keepgoingOnSuccess: true
  description: ''
  name: skip unavailable nodes
  uuid: 2811ecd9-c813-4829-b3f8-2ead9df39eb6
  nodefilters:
    dispatch:
      threadcount: 1
      keepgoing: true
      excludePrecedence: true
      rankOrder: ascending
    filter: .*
  group: adhoc

Hope this helps.
Reply all
Reply to author
Forward
0 new messages