Icinga/icingaweb2-module-businessprocess

pending hosts/service with a downtime throw error "Undefined index: PENDING-HANDLED"

log1-c opened this issue · 1 comments

Describe the bug

Having a modeled BP where inside one node there is a object that is in a pending state and has a downtime (or supposedly any handled state) this causes the BP to throw an error when accessing that node.

To Reproduce

Have a BP with a node containing a host/service in pending state and add a downtime to it.

Tree view works:
image

Same process in tile view:
the pending node is in the Front End node
image

thrown error:
image

Undefined index: PENDING-HANDLED

#0 /usr/share/icingaweb2/modules/businessprocess/library/Businessprocess/BpNode.php(87): Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}()
#1 /usr/share/icingaweb2/modules/businessprocess/library/Businessprocess/Renderer/TileRenderer/NodeTile.php(132): Icinga\Module\Businessprocess\BpNode->getStateSummary()
#2 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(339): Icinga\Module\Businessprocess\Renderer\TileRenderer\NodeTile->render()
#3 /usr/share/icinga-php/ipl/vendor/ipl/html/src/BaseHtmlElement.php(255): ipl\Html\HtmlDocument->renderUnwrapped()
#4 /usr/share/icinga-php/ipl/vendor/ipl/html/src/BaseHtmlElement.php(323): ipl\Html\BaseHtmlElement->renderContent()
#5 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(499): ipl\Html\BaseHtmlElement->renderUnwrapped()
#6 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(339): ipl\Html\HtmlDocument->render()
#7 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(499): ipl\Html\HtmlDocument->renderUnwrapped()
#8 /usr/share/icingaweb2/modules/businessprocess/library/Businessprocess/Renderer/TileRenderer.php(66): ipl\Html\HtmlDocument->render()
#9 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(339): Icinga\Module\Businessprocess\Renderer\TileRenderer->render()
#10 /usr/share/icinga-php/ipl/vendor/ipl/html/src/BaseHtmlElement.php(255): ipl\Html\HtmlDocument->renderUnwrapped()
#11 /usr/share/icinga-php/ipl/vendor/ipl/html/src/BaseHtmlElement.php(323): ipl\Html\BaseHtmlElement->renderContent()
#12 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(499): ipl\Html\BaseHtmlElement->renderUnwrapped()
#13 /usr/share/icingaweb2/modules/businessprocess/application/views/scripts/default.phtml(2): ipl\Html\HtmlDocument->render()
#14 /usr/share/php/Icinga/Web/View.php(235): include(String)
#15 /usr/share/icingaweb2/library/vendor/Zend/View/Abstract.php(877): Icinga\Web\View->_run()
#16 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(904): Zend_View_Abstract->render()
#17 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(925): Zend_Controller_Action_Helper_ViewRenderer->renderScript()
#18 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(964): Zend_Controller_Action_Helper_ViewRenderer->render()
#19 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker.php(272): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#20 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(518): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#21 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#22 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch()
#23 /usr/share/php/Icinga/Application/Web.php(290): Zend_Controller_Front->dispatch()
#24 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#25 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#26 {main}

Pending objects without a downtime work without problems.
image

Expected behavior

handled pending objects should behave the same way as pending objects.

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Icinga Web 2 version and modules (System - About): 2.11.1
  • BP module version: v2.4.0
  • Web browser used: Chrome
  • Icinga 2 version used (icinga2 --version): v2.13.4
  • PHP version used (php --version): PHP 7.4.3
  • Server operating system and version: Ubuntu 20.04

Thanks for the report! Reproduced it , only with a pending service though. A pending host doesn't cause this on my end.