rundeck icon indicating copy to clipboard operation
rundeck copied to clipboard

Job Reference: Use referenced job's nodes option not working

Open etaormm opened this issue 2 years ago • 3 comments

Describe the bug So, when adding a Node or Workflow step and using a Job Reference, there is an option "Use referenced job's nodes" What ever you select (tick or no tick) it will still use the nodes from the child/referenced job, not from the Parent/Main job where I'm defining this configuration.

My Rundeck detail

  • Rundeck version: 5.1.2
  • install type: docker
  • OS Name/version: ubuntu 20.04
  • DB Type/version: mysql 8

To Reproduce Steps to reproduce the behavior:

  1. Go to New Job
  2. Click on Workflow
  3. Scroll down to Add a Step and add a Job Reference

Expected behavior If I tick on Use referenced job's nodes , it should use that Child job nodes. If i un-tick Use referenced job's nodes, it should use Parent job nodes.

Screenshots image

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 22

Additional: If this is a expected behavior, please tell me how can I reference multiple jobs from one "main" job, but I want those referenced jobs to use nodes defined in Parent job.

etaormm avatar Mar 29 '24 10:03 etaormm

Reproduced.

Parent Job (ProjectA):

- defaultTab: nodes
  description: ''
  executionEnabled: true
  id: 3319cc16-ef99-4c0f-ac0f-6108ad2afb36
  loglevel: INFO
  name: parent
  nodeFilterEditable: false
  nodefilters:
    dispatch:
      excludePrecedence: true
      keepgoing: false
      rankOrder: ascending
      successOnEmptyNodeFilter: false
      threadcount: '1'
    filter: node02
  nodesSelectedByDefault: true
  plugins:
    ExecutionLifecycle: null
  scheduleEnabled: true
  sequence:
    commands:
    - jobref:
        group: ''
        name: child
        nodeStep: 'true'
        project: ProjectB
        uuid: caec8559-5bb5-4c85-9c43-b77528b4a4ca
    keepgoing: false
    strategy: node-first
  uuid: 3319cc16-ef99-4c0f-ac0f-6108ad2afb36

Child Job (Project B):

- defaultTab: nodes
  description: ''
  executionEnabled: true
  id: caec8559-5bb5-4c85-9c43-b77528b4a4ca
  loglevel: INFO
  name: child
  nodeFilterEditable: false
  nodefilters:
    dispatch:
      excludePrecedence: true
      keepgoing: false
      rankOrder: ascending
      successOnEmptyNodeFilter: false
      threadcount: '1'
    filter: localhost
  nodesSelectedByDefault: true
  plugins:
    ExecutionLifecycle: null
  scheduleEnabled: true
  sequence:
    commands:
    - exec: whoami
    keepgoing: false
    strategy: node-first
  uuid: caec8559-5bb5-4c85-9c43-b77528b4a4ca

Following this: Use referenced job's nodes. If the referenced job is from another project, you can use referenced job node list instead of the parent's nodes.

Doesn't work. The "Use referenced job's nodes" checkbox operates on the child-defined nodes (which is ok). However, disabling this results in the same outcome (runs on the child job specified nodes).

Thanks @etaormm.

MegaDrive68k avatar Apr 03 '24 14:04 MegaDrive68k

Hi @MegaDrive68k, this bug is active/open for a few months now... can we prioritize a fix for this? ..since its an important feature. Thanks

etaormm avatar Jul 09 '24 07:07 etaormm