Upgrade and migration of rundeck

76 views
Skip to first unread message

Andrew Meyer

unread,
May 16, 2023, 5:40:59 PM5/16/23
to rundeck-discuss
Hello,
We are in the process of moving to a new server running the latest version of rundeck. Migrating from Rundeck 3.2 to 4.11. However we are hitting some obstacles in the way.  I've managed to migrate all of the projects successfully.  However I see that the Default Node Executor information didn't migrate with it.  So I am now setting that up.  I already have my ssh keys set up for the rundeck user but I need to set up ansible as well.  I'm not seeing a place where I can easily configure this to be system-wide but did read about creating and configuring project.properties to accomplish this.  I am struggling a bit on configuring it.  Is this the BEST method?  Is there an easier way to do this?  I can post the config if necessary.


rac...@rundeck.com

unread,
May 16, 2023, 5:54:15 PM5/16/23
to rundeck-discuss
Hi Andrew,

In that case the best method to migrate Rundeck from 3.2 is to create a fresh instance (the gap between 3.2 and 4.11 is huge). So, in the ansible integration specific scenario make sure to use the right model source and node executor. Here you can see a short guide to configure it.

Of course, the best way is to check the 3.2 configuration (project wide: default node excutor, file copier and the model source configuration) in  a non-prod 4.11 enviroment

Regards.

Andrew Meyer

unread,
May 18, 2023, 3:11:05 PM5/18/23
to rundeck-discuss
So I followed the directions and tried to run a job and got the following error:

[workflow] Begin step: 1,NodeDispatch
1: Workflow step executing: ScriptFileItem{script=[162 chars]}
preparing for sequential execution on 1 nodes
Executing command on node: d1xrundkadm01, NodeEntryImpl{tags=[], attributes={nodename=RUNDECK_NODE, hostname=$HOSTNAME, osVersion=4.18.0-425.19.2.el8_7.x86_64, osFamily=unix, osArch=amd64, description=Rundeck server node, osName=Linux}, project='null'}
[workflow] beginExecuteNodeStep(RUNDECK_NODE): NodeDispatch: ScriptFileItem{script=[162 chars]}
[workflow] finishExecuteNodeStep( RUNDECK_NODE ): NodeDispatch: Unknown: null
Failed dispatching to node d1xrundkadm01: java.lang.NullPointerException
Failed dispatching to node d1xrundkadm01: com.dtolabs.rundeck.core.execution.workflow.steps.node.NodeStepException: java.lang.NullPointerException at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeNodeStep(ExecutionServiceImpl.java:221) at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:130) at com.dtolabs.rundeck.core.execution.dispatch.SequentialNodeDispatcher.dispatch(SequentialNodeDispatcher.java:61) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.dispatchToNodesWith(ExecutionServiceImpl.java:263) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.dispatchToNodes(ExecutionServiceImpl.java:234) at com.dtolabs.rundeck.core.execution.workflow.steps.NodeDispatchStepExecutor.executeWorkflowStep(NodeDispatchStepExecutor.java:66) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:111) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowExecutor.executeWFItem(BaseWorkflowExecutor.java:285) at com.dtolabs.rundeck.core.execution.workflow.BaseWorkflowExecutor.executeWorkflowStep(BaseWorkflowExecutor.java:681) at com.dtolabs.rundeck.core.execution.workflow.engine.StepCallable.apply(StepCallable.java:71) at com.dtolabs.rundeck.core.execution.workflow.engine.StepOperation.apply(StepOperation.java:76) at com.dtolabs.rundeck.core.execution.workflow.engine.StepOperation.apply(StepOperation.java:32) at com.dtolabs.rundeck.core.rules.WorkflowEngineOperationsProcessor.lambda$beginOperation$1(WorkflowEngineOperationsProcessor.java:323) at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125) at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57) at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at java.io.File.<init>(File.java:277) at com.dtolabs.rundeck.core.execution.script.ScriptfileUtils.createTempFile(ScriptfileUtils.java:301) at com.dtolabs.rundeck.core.execution.impl.common.DefaultFileCopierUtil.writeScriptTempFile(DefaultFileCopierUtil.java:134) at com.dtolabs.rundeck.core.execution.impl.common.DefaultFileCopierUtil.writeScriptTempFile(DefaultFileCopierUtil.java:83) at com.dtolabs.rundeck.core.execution.workflow.steps.node.impl.DefaultScriptFileNodeStepUtils.writeScriptToTempFile(DefaultScriptFileNodeStepUtils.java:184) at com.dtolabs.rundeck.core.execution.workflow.steps.node.impl.DefaultScriptFileNodeStepUtils.executeScriptFile(DefaultScriptFileNodeStepUtils.java:110) at com.dtolabs.rundeck.core.execution.workflow.steps.node.impl.ScriptFileNodeStepExecutor.executeNodeStep(ScriptFileNodeStepExecutor.java:81) at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeNodeStep(ExecutionServiceImpl.java:207) ... 18 more
1: Workflow step finished, result: NodeDispatchFailure: Failed dispatching to node d1xrundkadm01: java.lang.NullPointerException
[workflow] Finish step: 1,NodeDispatch

rac...@rundeck.com

unread,
May 18, 2023, 3:38:15 PM5/18/23
to rundeck-discuss
Hello, Andrew.

Rundeck appears to be unable to connect to the remote node.

1. Could you please check the model source and ensure that you can send commands to the ansible nodes? Take a look at this in addition to the guide from the previous post.
2. Make sure to use the correct path when utilizing a key stored on the Rundeck Key Storage (a similar issue).

Regards.

Andrew Meyer

unread,
May 18, 2023, 4:16:06 PM5/18/23
to rundeck-discuss
Thanks for the quick reply.  But the execution node is the same node that rundeck runs on.  Still reviewing the links you provided.

rac...@rundeck.com

unread,
May 18, 2023, 4:20:20 PM5/18/23
to rundeck-discuss
Hi Andrew, If you want to dispatch commands or jobs against the Rundeck server please use the local model source.

You can use multiple model sources in a single project. For example:

1) localhost (the local model source, the rundeck server).
2) ansible model source (takes the ansible inventory).
3) any else like EC2, a file model source ("resources.xml/yaml"), etc...

Regards!

Andrew Meyer

unread,
May 18, 2023, 4:24:14 PM5/18/23
to rundeck-discuss
Also I should note that we are not running this from source OR rpm, but we are running the war file using systemd.  So I am trying to apply all the information to my configuration.

/usr/bin/java -Xmx4096m -Xms1024m -XX:MaxMetaspaceSize=256m -server -Dserver.web.context=/ -Dserver.http.host=$INT_IP_ADDR -Dserver.http.port=4440 -jar /opt/rundeck/rundeck-4.11.0-20230313.war
Reply all
Reply to author
Forward
0 new messages