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

When poller first runs, time since last run produces an error #4254

Closed
jmrcpn opened this issue May 8, 2021 · 3 comments
Closed

When poller first runs, time since last run produces an error #4254

jmrcpn opened this issue May 8, 2021 · 3 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@jmrcpn
Copy link

jmrcpn commented May 8, 2021

Describe the bug

poller.php line 328
Variable poller_seconds_sincerun is set incorrectly to 'never' and "round" function
complain about it,
php report then report poller "crash"
Caution, this show-up using php-8.0.5

Problem locally fixed with fix
poller_seconds_sincerun = '0';

To Reproduce

Problem show up only on a brand new installation
(poller_lastrun not set)

Expected behavior

Graph display updated with "fresh" data.

@jmrcpn jmrcpn added bug Undesired behaviour unverified Some days we don't have a clue labels May 8, 2021
@netniV netniV changed the title poller.php poller_seconds_sincerun When poller first runs, time since last run produces an error May 8, 2021
netniV added a commit that referenced this issue May 8, 2021
When a poller first runs, there is no previous run timestamp but the code was trying to round on the default value which is a string.

Closes #4254
@netniV
Copy link
Member

netniV commented May 8, 2021

I would recommend you update your code to use the above patch. The reason for text string is to make it clear that there was no previous runtime available. Thanks for report it.

@netniV netniV closed this as completed May 8, 2021
@jmrcpn
Copy link
Author

jmrcpn commented May 8, 2021

  1. I perfectly understood "never" was intended to mark ' no previous runtime available'
  2. round function is complaining/crashing about it (when no previous runtime available)
  3. this part of cacti code is 6 year old and never got trouble about it, but now with php-8 "round" fonction is
    complaining
  4. I am using 1.2.16, poller.php code is still the same within 1.2.17
  5. Sorry, But whereis the "above patch", what am I missing here?

@netniV
Copy link
Member

netniV commented May 8, 2021

If you look, there is a commit a2febc0 that was applied and github listed above. Thanks for clearing up that PHP 8 is now erroring on string rounding (which is right). We may start to see other reports fall in.

@netniV netniV removed the unverified Some days we don't have a clue label May 14, 2021
@netniV netniV added this to the 1.2.18 milestone May 14, 2021
@netniV netniV added the resolved A fixed issue label Jun 9, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants