cacti icon indicating copy to clipboard operation
cacti copied to clipboard

Poller cache cannot be rebuilt from CLI, must use Web GUI

Open rb83 opened this issue 4 years ago • 6 comments

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:

  1. Update SNMP credentials for a device.

  2. Execute rebuild_poller_cache.php with device id from 1.

  3. 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.

rb83 avatar Aug 20 '21 12:08 rb83

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 avatar Aug 23 '21 07:08 rb83

@rb83, can your redo your pull request against the 1.2.x branch?

TheWitness avatar Sep 08 '21 23:09 TheWitness

@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.

rb83 avatar Sep 09 '21 06:09 rb83

Yup.

TheWitness avatar Sep 09 '21 10:09 TheWitness

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.

rb83 avatar Sep 09 '21 12:09 rb83

Sure. Take your time. No rush.

TheWitness avatar Sep 09 '21 12:09 TheWitness

@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.

TheWitness avatar Nov 16 '22 01:11 TheWitness