Refresh Project Nodes job step : no refresh if cache timout is not exceeded
grosbedos opened this issue · comments
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
Hi @grosbedos
Could you try this approach? (put a sleep time before the Refresh Project Nodes Step).
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.