Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh Project Nodes job step : no refresh if cache timout is not exceeded #8956

Open
grosbedos opened this issue Feb 28, 2024 · 3 comments

Comments

@grosbedos
Copy link

Hello,

At the moment I only have 100 linux nodes in an ansible inventory.

The default cache time is 30 seconds.

When I browse the jobs, nodes, or configuration nodes page, the cache is regenerated each time and it takes several minutes.

In fact, rundeck is always interrogating my nodes.

I have try some things :

  • If I deactivate the cache, the pages take 2 to 3 minutes to display.
  • If I activate the cache, with a long cache time (24h for example), I don't get my new nodes when I modify my inventory. (expected behaviour)

To remedy this, I've added a "Refresh Project Nodes" job step. Unfortunately, this job step only works if the cache time is exceeded...

Is this normal behavior?

My Rundeck detail

  • Rundeck version: 5.1.0
  • install type: deb
  • OS Name/version: debian 12
  • DB Type/version: postgres

Expected behavior
The "Refresh Project Nodes" job step should refresh the cache even if the cache timeout is not expired.

Desktop (please complete the following information):

  • OS: WIndows 11
  • Browser brave
  • Version 1.63.162

Best regards

@MegaDrive68k
Copy link

Hi @grosbedos

Could you try this approach? (put a sleep time before the Refresh Project Nodes Step).

@grosbedos
Copy link
Author

Thank you for your reply. Unfortunately, it still works the same way.

If the cache is still valid, there is no refresh with step "Refresh Project Nodes".

My job workflow:
rundeck

And the output :

rundeck2

Best regard

@MegaDrive68k
Copy link

MegaDrive68k commented Mar 4, 2024

Hi @grosbedos,

Weird, I can't reproduce the issue on 5.1.0 (tested on "normal" XML/YAML file and Ansible model sources).

Tested using this job definition (pointing to all nodes):

- defaultTab: nodes
  description: ''
  executionEnabled: true
  id: c2096c35-5417-4f35-b1d5-3afe2e0b432b
  loglevel: INFO
  name: HelloWorld
  nodeFilterEditable: false
  nodefilters:
    dispatch:
      excludePrecedence: true
      keepgoing: false
      rankOrder: ascending
      successOnEmptyNodeFilter: false
      threadcount: '1'
    filter: .*
  nodesSelectedByDefault: true
  plugins:
    ExecutionLifecycle: {}
  scheduleEnabled: true
  sequence:
    commands:
    - nodeStep: false
      type: source-refresh-plugin
    - exec: whoami
    keepgoing: false
    strategy: node-first
  uuid: c2096c35-5417-4f35-b1d5-3afe2e0b432b

I've configured the model source to update every 300 seconds in the following way:

project.nodeCache.delay=300
project.nodeCache.enabled=true
project.nodeCache.firstLoadSynch=true

Changing the Ansible inventory and then, executing the job multiple times I'm seeing the change immediately.

Probably I'm missing something. Could you try with fewer nodes? (just to identify the root cause) Probably is related to the huge number of nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants