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

Infinite loop in poller_automation.php if auto net discovery is "almost turned on" #342

Closed
tgkay opened this issue Feb 26, 2017 · 2 comments
Labels
bug Undesired behaviour

Comments

@tgkay
Copy link

tgkay commented Feb 26, 2017

If a foolish user (me in this case) sets a schedule type of monthly but then fails to set days, dates etc. you end up with poller automation in an infinite loop:

The call to background_exec() in the cacti/poller_automation.php in the net_discovery process proceeds and the switch statement in api_automation_is_time_to_start() gets a discovery type of 4 with a $net['next_start'] == '0000-00-00 00:00:00' but $days as an empty array thus the while(TRUE) loop break is never matched.

It's obviously user error but that should be flagged in the interface or die gracefully. Hopefully the above is clear, I'm posting this as I /need/ to get my cacti instance up and each poll creating a spinning PHP process has led to there being some work to do. Happy to provide more info later in the week if required.

Thanks for the otherwise excellent software!

Tim

@cigamit
Copy link
Member

cigamit commented Feb 26, 2017

Yousa, going to fix that one. Won't make the 1.0.4 release, but right after.

@cigamit cigamit added the bug Undesired behaviour label Feb 26, 2017
cigamit added a commit that referenced this issue Mar 4, 2017
Infinite loop in poller_automation.php with invalid schedule.
@cigamit
Copy link
Member

cigamit commented Mar 4, 2017

Resolved on the front side. For new networks, they will be disabled in cases where the date ranges have been defined incorrectly.

@cigamit cigamit closed this as completed Mar 4, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour
Projects
None yet
Development

No branches or pull requests

2 participants