[icinga-checkins] icinga.org: icingaweb2-module-director/feature/test-runner-12905: IcingaService: do not disable services twice

git at icinga.org git at icinga.org
Wed Nov 2 19:31:05 CET 2016


Module: icingaweb2-module-director
Branch: feature/test-runner-12905
Commit: 22802114aca0d191d8bdf92424922816b1e9f3e2
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=22802114aca0d191d8bdf92424922816b1e9f3e2

Author: Thomas Gelf <thomas at gelf.net>
Date:   Mon Oct 31 12:34:23 2016 +0000

IcingaService: do not disable services twice

fixes #13017

---

 library/Director/Objects/IcingaService.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/Director/Objects/IcingaService.php b/library/Director/Objects/IcingaService.php
index acc0333..c2a0f00 100644
--- a/library/Director/Objects/IcingaService.php
+++ b/library/Director/Objects/IcingaService.php
@@ -174,7 +174,7 @@ class IcingaService extends IcingaObject
     {
         $str = parent::toConfigString();
 
-        if ($this->host_id && $this->getRelated('host')->isDisabled()) {
+        if (! $this->isDisabled() && $this->host_id && $this->getRelated('host')->isDisabled()) {
             return "/* --- This services host has been disabled ---\n"
                 . $str . "*/\n";
         } else {



More information about the icinga-checkins mailing list