cacti
cacti copied to clipboard
Poller cache cannot be rebuilt from CLI, must use Web GUI
As the title says. So far, I've tracked the root cause down to rebuild_poller_cache.php not doing the necessary work before calling update_poller_cache() and poller_update_poller_cache_from_buffer(), compared to what push_out_host() is doing.
push_out_host() is called when initiating a rebuild for a single host through the Web GUI (using host.php), but not through the CLI.
I'm currently preparing a PR which hopefully solves the issue.
To Reproduce
Steps to reproduce the behavior:
-
Update SNMP credentials for a device.
-
Execute
rebuild_poller_cache.phpwith device id from 1. -
View Poller cache through Web GUI; Credentials are not updated.
Expected behavior
Cache is updated with new credentials.
Additional context
Cacti 1.2.16, but the issue likely exists in earlier and later versions as well.
Some additional context: This is relevant for medium to big installations; for these it's not feasible to update each and every host through the Web GUI.
@rb83, can your redo your pull request against the 1.2.x branch?
@TheWitness, no PR to redo yet, since I'm still working on this. Are you by chance referring to #4339 ?
I can open a Draft PR, if you want.
Yup.
1.2.x and develop have diverged quite a bit. Unfortunately, I have started my work on top of develop. To create a draft PR against 1.2.x, I'd need to rebase against that branch and complete the work, and afterwards rebase once more against develop.
I'd prefer to complete the work against the develop branch first though, and rebase and rework against 1.2.x afterwards. This way it's much easier for me (since I'm really not that familiar with cacti's codebase to begin with) and we get results earlier.
Sure. Take your time. No rush.
@rb83, I looked back at your changes and did an attempt to backport them, but I found that it did not work. I'm going to close this one as a result. We at some point are going to move 1.2.x back to develop. If you want to try another pull request against 1.2.x that works, I'd be glad to merge it. Until then, I'm going to close this one.