Icinga / icingaweb2-module-director

The Director aims to be your new favourite Icinga config deployment tool. Director is designed for those who want to automate their configuration deployment and those who want to grant their “point & click” users easy access to the configuration.
https://icinga.com/docs/director/latest
GNU General Public License v2.0
413 stars 203 forks source link

"Not found" - when we try to edit service inside of service set - not all service sets are affected #2748

Open fatslimjoe opened 1 year ago

fatslimjoe commented 1 year ago

Expected Behavior

open edit form of icinga2 service which is inside of some service set's in icinga director and change some values inside of fileds.

Current Behavior

after trying to edit service inside of service set it is trowing error's (Not all service sets are affected.):

image

Error in plain text:

Not found

0 /usr/share/icingaweb2/modules/director/library/Director/Web/Controller/ObjectController.php(507): Icinga\Module\Director\Controllers\ServiceController->loadObject()

1 /usr/share/icingaweb2/modules/director/library/Director/Web/Controller/ObjectController.php(100): Icinga\Module\Director\Web\Controller\ObjectController->loadOptionalObject()

2 /usr/share/icingaweb2/modules/director/library/Director/Web/Controller/ObjectController.php(69): Icinga\Module\Director\Web\Controller\ObjectController->initializeWebRequest()

3 /usr/share/icingaweb2/modules/director/application/controllers/ServiceController.php(50): Icinga\Module\Director\Web\Controller\ObjectController->init()

4 /usr/share/php/Icinga/Web/Controller/ActionController.php(170): Icinga\Module\Director\Controllers\ServiceController->init()

5 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(59): Icinga\Web\Controller\ActionController->__construct()

6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch()

7 /usr/share/php/Icinga/Application/Web.php(290): Zend_Controller_Front->dispatch()

8 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()

9 /usr/share/icingaweb2/public/index.php(4): require_once(String)

10 {main}

Possible Solution

clone service set or create new one

Steps to Reproduce (for bugs)

edit existing service inside of existing service set

Your Environment

We have noticed this problem after we updated our env on following version:

Issue is for quit a while existen in Icinga2 Community but didnt noticed that is any github issue open:

https://community.icinga.com/t/icinga-director-cant-add-service-template-to-service-set/11021/3

fatslimjoe commented 1 year ago

update: Clone service set which has "edit issue" will not be solution for every service set. Another workaround solution is build service set from scratch.

Very important to mention it, there is not errors in logs and no errors in icinga2 daemon -C .... no problems under /var/lib/icinga2/api as well

CalmVibes commented 1 year ago

I found a workaround - set ServiceSets to hosts through HostGroups. Not just adding a ServiceSet to the list of Services of the Host. In my case, the situation has returned to normal.

fatslimjoe commented 1 year ago

I found a workaround - set ServiceSets to hosts through HostGroups. Not just adding a ServiceSet to the list of Services of the Host. In my case, the situation has returned to normal.

We are using hostgroups for apply rules for our service sets. Some was working some not ...

I have tested newest Director version 1.11.0 in our test env. It seems that they have fix it. I would say it was bug. Now in test env. didnt noticed any issue. Now director is working like a charm. Will continue with testing.

Thx for feedback!