Bug 244264

Summary: www/glpi: cron: Undefined variable: cron_status
Product: Ports & Packages Reporter: O. Hartmann <ohartmann>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed Feedback Timeout    
Severity: Affects Only Me CC: mathias
Priority: --- Flags: bugzilla: maintainer-feedback? (mathias)
Version: Latest   
Hardware: Any   
OS: Any   

Description O. Hartmann 2020-02-21 05:53:34 UTC
Running www/glpi on FreeBSD 11.3-RELENG, there seems to be a problem with the cron triggered GLPI task scheduler, responsible for notifications and FusionInventory. As recoomended, the appropriate job is triggered by a cronjob owned by user 'www', edited via:

crontab -e -u www

and looking like:

[...]
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
* * * * * /usr/local/bin/php  /usr/local/www/glpi/front/cron.php & >/dev/null
[...]

On a daily basis, the FreeBSD host reports an error via email from user www@...:

[...]
Toolbox::userErrorHandlerNormal() in /usr/local/www/glpi/inc/toolbox.class.php line 659
  *** PHP Notice(8): Undefined variable: cron_status
  Backtrace :
  plugins/fusioninventory/inc/agent.class.php:1243   
  inc/crontask.class.php:829                         PluginFusioninventoryAgent::cronCleanoldagents()
  front/cron.php:83                                  CronTask::launch()

The ports tree/packages are up to date so far and so is the host's FreeBSD 11.3-RELENG:
11.3-RELEASE-p6 FreeBSD 11.3-RELEASE-p6 #4 r357426: Mon Feb  3 08:22:52 CET 2020 amd64

and port

glpi-9.4.2,1                   www/glpi
p5-FusionInventory-Agent-2.4   net-mgmt/p5-FusionInventory-Agent

Any ideas what the problem may cause?
Comment 1 Mathias Monnerville 2020-04-06 09:31:30 UTC
Hello,

Hard to say for now. I filled a port update a couple of days ago for version 9.4.5 (see PR 244971).

So I would suggest, when my patch is committed, that you try again with 9.4.5 and let me know.
Comment 2 Mathias Monnerville 2020-12-11 05:58:36 UTC
Hi @ohartmann,

What's the status of this PR? Can you check against the recent 9.5.3 patch please? Thanks.
Comment 3 O. Hartmann 2020-12-11 15:10:51 UTC
(In reply to Mathias Monnerville from comment #2)

Hello,

I have to wait until the port has been updated via poudriere cycle (on our systems) tothe new version 9.5.3 and then I'll check again.
Comment 4 Mathias Monnerville 2020-12-28 11:23:41 UTC
(In reply to O. Hartmann from comment #3)

Hi, is it still an issue or we close this PR? Thanks
Comment 5 Dmitry Marakasov freebsd_committer freebsd_triage 2021-02-16 21:29:32 UTC
Feedback timeout, assumed no longer relevant. At the very least, the code mentioned in backtrace has changed significantly.