Unfortunately I do have a custom host variable “Location” with a capital letter at the beginning.
This wasn’t a big deal until now.
When using the Cube Module it is showing the variable with the capital “L” in the drop-down list but when selecting it it is converted to a small “L”.
When selecting “Show host status” everything is fine (hosts are displayed) but the director function is showing “Modify 0 hosts” and throwing this error when clicked:
Uncaught Error: Call to a member function hasConnection() on bool in /usr/share/icingaweb2/modules/director/library/Director/Web/Form/DirectorObjectForm.php:145 Stack trace: #0 /usr/share/icingaweb2/modules/director/application/forms/IcingaMultiEditForm.php(28): Icinga\Module\Director\Web\Form\DirectorObjectForm->object() #1 /usr/share/icingaweb2/modules/director/library/Director/Web/Controller/ObjectsController.php(186): Icinga\Module\Director\Forms\IcingaMultiEditForm->setObjects(Array) #2 /usr/share/icingaweb2/modules/director/library/Director/Web/Controller/ObjectsController.php(169): Icinga\Module\Director\Web\Controller\ObjectsController->commonForEdit() #3 /usr/share/icingaweb2/modules/director/application/controllers/HostsController.php(37): Icinga\Module\Director\Web\Controller\ObjectsController->editAction() #4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Director\Controllers\HostsController->editAction() #5 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(7
One of my approaches would be modifying the variable to small letters directly in the Icinga Director database (2000+ hosts).
Is this a good idea?
Any other recommendations? Opening an Issue for the Cube Module?
I’ve seen that there is a new Cube Module release planned for next week (v1.2.0) but I haven’t found any open/closed issues that correspond to this error.
Thanks for your comments!
- Icinga Web 2 version: 2.9.3
- Used modules and their versions (System - About):
- Cube 1.1.1
- Director master_20210715
- Icinga 2 version used (
icinga2 --version): 2.13.1
- PHP version used (
php --version): php-fpm 7.3.29
- Server operating system and version: CentOS 7