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

[dev.icinga.com #13263] Notification templates broken in recent git #616

Closed
icinga-migration opened this issue Nov 20, 2016 · 11 comments
Closed
Labels
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/13263

Created by aross on 2016-11-20 21:30:02 +00:00

Assignee: tgelf
Status: Resolved (closed on 2016-12-14 14:10:03 +00:00)
Target Version: 1.3.0
Last Update: 2016-12-15 10:47:03 +00:00 (in Redmine)


After pulling from git this morning the Notifications/Templates page is broken. The PHP file mentioned doesn't appear to exist in the filesystem or in the git repo.

Cannot load icingaNotificationTemplate (/opt/data/www/icingaweb2/modules/director/application/tables//IcingaNotificationTemplateTable.php), no such table


#0 /opt/data/www/icingaweb2/modules/director/library/Director/Web/Controller/ActionController.php(117): Icinga\Module\Director\Web\Table\TableLoader::load('icingaNotificat...', Object(Icinga\Application\Modules\Module))
#1 /opt/data/www/icingaweb2/modules/director/library/Director/Web/Controller/ObjectsController.php(128): Icinga\Module\Director\Web\Controller\ActionController->loadTable('icingaNotificat...')
#2 /opt/data/www/icingaweb2/modules/director/library/Director/Web/Controller/ObjectsController.php(200): Icinga\Module\Director\Web\Controller\ObjectsController->indexAction()
#3 /opt/data/www/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Director\Web\Controller\ObjectsController->templatesAction()
#4 /opt/data/www/icingaweb2/library/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('templatesAction')
#5 /opt/data/www/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#6 /opt/data/www/icingaweb2/library/Icinga/Application/Web.php(384): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /opt/data/www/icingaweb2/library/Icinga/Application/webrouter.php(109): Icinga\Application\Web->dispatch()
#8 /opt/data/www/icingaweb2/public/index.php(4): require_once('/opt/data/www/i...')
#9 {main}

Changesets

2016-12-14 13:57:52 +00:00 by tgelf 30c2dfa

NotificationTable: simplify it, provide templates

fixes #13263

Relations:

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-11-21 08:42:00 +00:00

  • Assigned to set to tgelf
  • Target Version set to 1.3.0

Well... now it's morning over here too :D Thanks for reporting this, will be fixed. Guess you'll see it tomorrow :p

@icinga-migration
Copy link
Author

Updated by tuxifier on 2016-12-02 22:22:10 +00:00

tgelf wrote:

Well... now it's morning over here too :D Thanks for reporting this, will be fixed. Guess you'll see it tomorrow :p

Hi Tom,
I missed to meet you at Checkpoint Jenny this year because I missed OSMC sorrowly. :) :(
Is there any chance on a quick fix for this - or either a proposal for workaround?The only idea I have right now is to downgrade to a version able to create the template - well knowing I would "risk" the health of director's database - and then update again. (I'll count back the days from ten - every day that's left - I owe you a beer at next OSMC we meet ;)) It's all about motivation - isn't it? :)

@icinga-migration
Copy link
Author

Updated by tuxifier on 2016-12-07 10:05:03 +00:00

Found a pretty dirty workaround - that made me able to create my service notification template. I stole the direct URL to add template from a older working director installation:
/icingaweb2/director/notifications/templates#!/icingaweb2/director/notification/add?type=template

Doing so - you still get the error in the left icingaweb2 column - but you see the template addition input fields in the right column. Then add the template and store

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-12-07 10:13:29 +00:00

There is also a pending pull request:

#42

Just, this conflicts with something I have in my stash. A change from which I believe to be able to push it within a couple of hours. Since two weeks :p

I want to tag 1.3.0 tomorrow, and a fix for this will be part of it. The release was planned last week to fix compatibility issues with the cube module. But as that got fixed differently, I was no longer in a hurry. A beer always helps, sure. But in case you really fear I could not get enough of it these days: don't worry ;-)

@icinga-migration
Copy link
Author

Updated by tuxifier on 2016-12-07 14:18:45 +00:00

PeterAdmin in monitoring-forum found the following fix/workaround that helped me out so far:
(https://monitoring-portal.org/index.php?thread/38700-struggling-with-a-clean-install-of-director-not-possible-to-add-notification-tem/#post240667)

"I'm new in Icinga (and Nagios) and i install yust my first Icinga Server. I had the same Problem + i have found a solution.

I have additional the vagrant demo VM running with the older director Version. In this Version there is also no IcingaNotificationTemplateTable.php. But here i can create notification templates.

Then i analyzed the existing template files and i created the IcingaNotificationTemplateTable.php self.

The Content is simpel:

<?php
namespace Icinga\Module\Director\Tables;
use Icinga\Module\Director\Tables\IcingaNotificationTable;
class IcingaNotificationTemplateTable extends IcingaNotificationTable
{
}

There is also no real extend nessessary.
My mail notifications are working fine now.

(I'm german)"

Thanks for that.

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-12-13 11:10:06 +00:00

  • Duplicated set to 13527

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-12-14 14:10:03 +00:00

  • Status changed from New to Resolved
  • Done % changed from 0 to 100

Applied in changeset 30c2dfa.

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-12-15 08:33:23 +00:00

  • Duplicated set to 13601

@icinga-migration
Copy link
Author

Updated by shoenscheid on 2016-12-15 08:51:27 +00:00

Updated to current Master. Get an other error:

Warning: Exception caught by form: strlen() expects parameter 1 to be string, object given Stack Trace: #0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, 'strlen() expect...', '/usr/share/icin...', 24, Array) #1 [internal function]: strlen(Object(stdClass)) #2 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/Element/ExtensibleSet.php(24): array_filter(Array, 'strlen') #3 /usr/share/icingaweb2/library/vendor/Zend/Form/Decorator/ViewHelper.php(205): Icinga\Module\Director\Web\Form\Element\ExtensibleSet->getValue() #4 /usr/share/icingaweb2/library/vendor/Zend/Form/Decorator/ViewHelper.php(234): Zend_Form_Decorator_ViewHelper->getValue(Object(Icinga\Module\Director\Web\Form\Element\ExtensibleSet)) #5 /usr/share/icingaweb2/library/vendor/Zend/Form/Element.php(2048): Zend_Form_Decorator_ViewHelper->render('') #6 /usr/share/icingaweb2/library/vendor/Zend/Form/Decorator/FormElements.php(115): Zend_Form_Element->render() #7 /usr/share/icingaweb2/library/vendor/Zend in /usr/share/icingaweb2/library/vendor/Zend/Form.php on line 2995

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-12-15 08:54:59 +00:00

shoenscheid wrote:

Updated to current Master. Get an other error:
[...]

Seems to be something completely different... could you please open a dedicated issue, attach a screenshot and explain me how you got there? Which object you've chosen or similar. Thanks!

@icinga-migration
Copy link
Author

Updated by tgelf on 2016-12-15 10:47:03 +00:00

Someone else did so: #13605 - should be fixed now.

@icinga-migration icinga-migration added this to the 1.3.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant