rundeck-plugins / ansible-plugin

Ansible Integration for Rundeck
MIT License
331 stars 100 forks source link

Failed: PluginFailed: null #363

Open Lusitaniae opened 5 months ago

Lusitaniae commented 5 months ago

3.2.9 seems to introduce a breakage

Rolling back to 3.2.8 solves the issue, can't upgrade to 4.0.0 due to https://github.com/rundeck-plugins/ansible-plugin/issues/362

Job config: image

debug logs:

[workflow] Begin execution: node-first
preparing for sequential execution on 1 nodes
Executing command on node: rundeck1, NodeEntryImpl{tags=[], attributes={nodename=rundeck1, hostname=https://rundeck.internal.endpoint, osVersion=5.4.0-174-generic, osFamily=unix, osArch=amd64, description=Rundeck server node, osName=Linux}, project='null'}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Start EngineWorkflowExecutor
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Update conditional state: {before.step.1=true, after.step.1=false}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] start conditions for step [1]: []
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] skip conditions for step [1]: [(step.1.completed == 'true')]
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Update conditional state: {after.step.2=false, before.step.2=true}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] start conditions for step [2]: [(after.step.1 == 'true')]
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] skip conditions for step [2]: [(step.2.completed == 'true')]
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Create rule engine with rules: RuleEngine{ruleSet=[Rule: Conditions([java.util.function.Predicate$$Lambda$585/0x000000084047e040@1b3f726c]) => DataState{state={step.1.skip=true}}, Rule: Conditions([(step.any.state.failed == 'true'), (workflow.keepgoing == 'false')]) => DataState{state={workflow.done=true}}, Rule: Conditions([(step.any.flowcontrol.halt == 'true')]) => DataState{state={workflow.done=true}}, Rule: Conditions([(after.step.1 == 'true')]) => DataState{state={step.2.start=true}}, Rule: Conditions([]) => DataState{state={step.1.start=true}}, Rule: Conditions([java.util.function.Predicate$$Lambda$585/0x000000084047e040@10dd4ce5]) => DataState{state={step.2.skip=true}}]}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Create workflow engine with state: StateLogger{state=DataState{state={workflow.id=0c16f2f0-0eb0-4175-b5eb-318768afcbca, workflow.keepgoing=false, after.step.2=false, before.step.1=true, after.step.1=false, before.step.2=true}}}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Begin: Workflow begin
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] WillProcessStateChange: state changes: init DataState{state={workflow.state=started}}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Update conditional state: {workflow.state=started}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Update conditional state: {step.1.start=true}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] DidProcessStateChange: applied state changes and rules (changed? true): init - StateLogger{state=DataState{state={workflow.id=0c16f2f0-0eb0-4175-b5eb-318768afcbca, workflow.keepgoing=false, after.step.2=false, before.step.1=true, step.1.start=true, after.step.1=false, before.step.2=true, workflow.state=started}}}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] WillRunOperation: operation starting: Step{stepNum=1, label='null'}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] LoopProgress: Pending(2) => run(1), skip(0), remain(1)
[workflow] Begin step: 1,NodeDispatch
1: Workflow step executing: StepExecutionItem{type='NodeDispatch', keepgoingOnSuccess=false, hasFailureHandler=false}
preparing for sequential execution on 1 nodes
Executing command on node: rundeck1, NodeEntryImpl{tags=[], attributes={nodename=rundeck1, hostname=https://rundeck.internal.endpoint, osVersion=5.4.0-174-generic, osFamily=unix, osArch=amd64, description=Rundeck server node, osName=Linux}, project='null'}
[workflow] beginExecuteNodeStep(rundeck1): NodeDispatch: StepExecutionItem{type='NodeDispatch', keepgoingOnSuccess=false, hasFailureHandler=false}
Failed executing node plugin [com.batix.rundeck.plugins.AnsiblePlaybookWorflowNodeStep] on node rundeck1: java.lang.NullPointerException
    at com.dtolabs.rundeck.core.storage.ProjectKeyStorageContextProvider.environmentForPath(ProjectKeyStorageContextProvider.java:40)
    at com.dtolabs.rundeck.core.storage.AuthRundeckStorageTree.authorizedPath(AuthRundeckStorageTree.java:62)
    at com.dtolabs.rundeck.core.storage.AuthRundeckStorageTree.getResource(AuthRundeckStorageTree.java:125)
    at com.dtolabs.rundeck.core.storage.AuthRundeckStorageTree.getResource(AuthRundeckStorageTree.java:32)
    at com.dtolabs.rundeck.core.storage.ResolvedExtTree.getResource(ResolvedExtTree.java:68)
    at org.rundeck.storage.impl.DelegateTree.getResource(DelegateTree.java:56)
    at com.rundeck.plugins.ansible.ansible.AnsibleRunnerBuilder.getPassphraseStorageData(AnsibleRunnerBuilder.java:930)
    at com.rundeck.plugins.ansible.ansible.AnsibleRunnerBuilder.getPassphrase(AnsibleRunnerBuilder.java:898)
    at com.rundeck.plugins.ansible.ansible.AnsibleRunnerBuilder.buildAnsibleRunner(AnsibleRunnerBuilder.java:729)
    at com.rundeck.plugins.ansible.plugin.AnsiblePlaybookWorflowNodeStep.executeNodeStep(AnsiblePlaybookWorflowNodeStep.java:86)
    at com.dtolabs.rundeck.core.execution.workflow.steps.node.NodeStepPluginAdapter.executeNodeStep(NodeStepPluginAdapter.java:164)
    at com.dtolabs.rundeck.core.execution.ExecutionServiceImpl.executeNodeStep(ExecutionServiceImpl.java:207)
    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:131)
    at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:75)
    at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Failed: PluginFailed: null
[workflow] finishExecuteNodeStep(rundeck1): NodeDispatch: PluginFailed: null
1: Workflow step finished, result: Dispatch failed on 1 nodes: [rundeck1: PluginFailed: null + {dataContext=MultiDataContextImpl(map={}, base=null)} ]
[workflow] Finish step: 1,NodeDispatch
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] OperationFailed: operation completed, success? false: OperationCompleted(identity=[1], stepNum=1, newState=DataState{state={step.1.result.failedNodes=rundeck1, step.1.completed=true, step.any.state.failed=true, before.step.1=false, step.1.state=failure, after.step.1=true}}, stepResultCapture=StepResultCapture{stepResult=Dispatch failed on 1 nodes: [rundeck1: PluginFailed: null + {dataContext=MultiDataContextImpl(map={}, base=null)} ], stepSuccess=false, statusString='null', controlBehavior=null, resultData=MultiDataContextImpl(map={}, base=null)}, success=false)
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] WillProcessStateChange: state changes: [1] DataState{state={step.1.result.failedNodes=rundeck1, step.1.completed=true, step.any.state.failed=true, before.step.1=false, step.1.state=failure, after.step.1=true}}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Update conditional state: {step.1.result.failedNodes=rundeck1, step.1.completed=true, step.any.state.failed=true, before.step.1=false, step.1.state=failure, after.step.1=true}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Update conditional state: {workflow.done=true, step.1.start=true, step.2.start=true, step.1.skip=true}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] DidProcessStateChange: applied state changes and rules (changed? true): [1] - StateLogger{state=DataState{state={workflow.done=true, step.1.completed=true, step.any.state.failed=true, after.step.2=false, before.step.1=false, step.1.start=true, after.step.1=true, before.step.2=true, step.2.start=true, workflow.state=started, workflow.id=0c16f2f0-0eb0-4175-b5eb-318768afcbca, step.1.result.failedNodes=rundeck1, workflow.keepgoing=false, step.1.state=failure, step.1.skip=true}}}
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] WorkflowEndState: Workflow end state reached.
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] WillShutdown: Workflow engine shutting down (interrupted? false)
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] IncompleteOperations: Some operations were not run: 1
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Complete: Workflow complete: [Step{stepNum=1, label='null'}: OperationCompleted(identity=[1], stepNum=1, newState=DataState{state={step.1.result.failedNodes=rundeck1, step.1.completed=true, step.any.state.failed=true, before.step.1=false, step.1.state=failure, after.step.1=true}}, stepResultCapture=StepResultCapture{stepResult=Dispatch failed on 1 nodes: [rundeck1: PluginFailed: null + {dataContext=MultiDataContextImpl(map={}, base=null)} ], stepSuccess=false, statusString='null', controlBehavior=null, resultData=MultiDataContextImpl(map={}, base=null)}, success=false)]
[wf:0c16f2f0-0eb0-4175-b5eb-318768afcbca] Step [2] did not run. start conditions: [(after.step.1 == 'true')], skip conditions: [(step.2.completed == 'true')]
[workflow] Finish execution:  node-first: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [rundeck1: PluginFailed: null + {dataContext=MultiDataContextImpl(map={}, base=null)} ]}, Node failures: {rundeck1=[PluginFailed: null + {dataContext=MultiDataContextImpl(map={}, base=null)} ]}, status: failed]
[Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [rundeck1: PluginFailed: null + {dataContext=MultiDataContextImpl(map={}, base=null)} ]}, Node failures: {rundeck1=[PluginFailed: null + {dataContext=MultiDataContextImpl(map={}, base=null)} ]}, status: failed]
Execution failed: 88007 in project triton-rpc: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [rundeck1: PluginFailed: null + {dataContext=MultiDataContextImpl(map={}, base=null)} ]}, Node failures: {rundeck1=[PluginFailed: null + {dataContext=MultiDataContextImpl(map={}, base=null)} ]}, status: failed]