ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5111

Changing a templated trigger resets all individual changes on hosts

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.4rc1, 2.1.0
    • Component/s: Frontend (F)
    • Environment:
      Debian 6.0.3
      mysql Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (x86_64)
      PHP 5.3.3-7+squeeze3 with Suhosin-Patch (cli)

      Description

      Updating a trigger in a template should only set those parameters that are indeed changed, not all of them.

      Example:
      I have a templated trigger, and have changed it's priority on several hosts.
      Now when I change the name of the trigger in the template, then it's priority is reset on all hosts.

        Issue Links

          Activity

          Hide
          Oleg Egorov added a comment -

          FIXED in svn://svn.zabbix.com/branches/dev/ZBX-5111-trunk r30878

          Show
          Oleg Egorov added a comment - FIXED in svn://svn.zabbix.com/branches/dev/ZBX-5111-trunk r30878
          Hide
          Eduards Samersovs added a comment -

          Tested! But in 2.0 is the same problem.

          Show
          Eduards Samersovs added a comment - Tested! But in 2.0 is the same problem.
          Hide
          Oleg Egorov added a comment - - edited

          FIXED in 2.0.4 r30955, 2.1.0 r30956
          CLOSED

          Show
          Oleg Egorov added a comment - - edited FIXED in 2.0.4 r30955, 2.1.0 r30956 CLOSED
          Hide
          Pavels Jelisejevs added a comment - - edited

          (1) Now when calling trigger.update and passing the same value for a parameter, it will be ignored and not inherited to child items. This is incorrect, all parameters passed to the method must be propagated to child triggers.

          Oleg Egorov RESOLVED

          Show
          Pavels Jelisejevs added a comment - - edited (1) Now when calling trigger.update and passing the same value for a parameter, it will be ignored and not inherited to child items. This is incorrect, all parameters passed to the method must be propagated to child triggers. Oleg Egorov RESOLVED
          Hide
          Jens Berthold added a comment -

          But why should anyone first change individual settings for the children, and then overwrite them by re-applying the same value to the trigger?
          If there should be any use cases, maybe you could introduce an optional parameter to trigger.update, something like "forceChildPropagationForUnchangedAttributes" (or maybe the inverted one, "ignoreUnchangedAttributes", to be backwards compatible)?
          Maybe the same could be introduced to the web GUI as a radio button?

          Show
          Jens Berthold added a comment - But why should anyone first change individual settings for the children, and then overwrite them by re-applying the same value to the trigger? If there should be any use cases, maybe you could introduce an optional parameter to trigger.update, something like "forceChildPropagationForUnchangedAttributes" (or maybe the inverted one, "ignoreUnchangedAttributes", to be backwards compatible)? Maybe the same could be introduced to the web GUI as a radio button?
          Hide
          Pavels Jelisejevs added a comment -

          Jens,

          The frontend after the fix behaves correctly, but the API doesn't. From the API's point of view, if you don't want to update a property, you shouldn't pass it to the method. But if you do pass it, it must always be propagated to children. That way you will be able to override all changes on child triggers, if you'll need to.

          Show
          Pavels Jelisejevs added a comment - Jens, The frontend after the fix behaves correctly, but the API doesn't. From the API's point of view, if you don't want to update a property, you shouldn't pass it to the method. But if you do pass it, it must always be propagated to children. That way you will be able to override all changes on child triggers, if you'll need to.
          Hide
          Oleg Egorov added a comment -

          FIXED IN svn://svn.zabbix.com/branches/dev/ZBX-5111 r30983

          Show
          Oleg Egorov added a comment - FIXED IN svn://svn.zabbix.com/branches/dev/ZBX-5111 r30983
          Hide
          Pavels Jelisejevs added a comment - - edited

          (2) When I try to change the severity of the trigger via the API, I get an error:

          Trigger "223" already exists on "super-template1".

          Oleg Egorov RESOLVED

          Pavels Jelisejevs CLOSED.

          Show
          Pavels Jelisejevs added a comment - - edited (2) When I try to change the severity of the trigger via the API, I get an error: Trigger "223" already exists on "super-template1". Oleg Egorov RESOLVED Pavels Jelisejevs CLOSED.
          Hide
          Pavels Jelisejevs added a comment - - edited

          (3) I have a template linked to a host and a trigger on a template. When I replace the template in the expression with the host, save it, and then change the host back to the template, the child trigger lacks certain attributes, like "Multiple event generation."

          Oleg Egorov RESOLVED in r31091

          Pavels Jelisejevs CLOSED.

          Show
          Pavels Jelisejevs added a comment - - edited (3) I have a template linked to a host and a trigger on a template. When I replace the template in the expression with the host, save it, and then change the host back to the template, the child trigger lacks certain attributes, like "Multiple event generation." Oleg Egorov RESOLVED in r31091 Pavels Jelisejevs CLOSED.
          Hide
          Pavels Jelisejevs added a comment - - edited

          (4) Selecting the expression in CTrigger::update() is not required, it's done later in CTriggerGeneral::inherit().

          Oleg Egorov RESOLVED

          Pavels Jelisejevs CLOSED.

          Show
          Pavels Jelisejevs added a comment - - edited (4) Selecting the expression in CTrigger::update() is not required, it's done later in CTriggerGeneral::inherit(). Oleg Egorov RESOLVED Pavels Jelisejevs CLOSED.
          Hide
          Pavels Jelisejevs added a comment - - edited

          (5) Another problem when moving triggers. I have a template T1 linked to T2 linked to host H1. When I create a trigger on T2 and change it's expression to T1, the trigger disappears from H1.

          Oleg Egorov This problem exist in 2.0.4 and not exist in 2.1.0

          Pavels Jelisejevs We've decided not to fix it in 2.0. CLOSED.

          Show
          Pavels Jelisejevs added a comment - - edited (5) Another problem when moving triggers. I have a template T1 linked to T2 linked to host H1. When I create a trigger on T2 and change it's expression to T1, the trigger disappears from H1. Oleg Egorov This problem exist in 2.0.4 and not exist in 2.1.0 Pavels Jelisejevs We've decided not to fix it in 2.0. CLOSED.
          Hide
          Pavels Jelisejevs added a comment -

          TESTED.

          Show
          Pavels Jelisejevs added a comment - TESTED.
          Hide
          Oleg Egorov added a comment -

          FIXED IN 2.0.4rc1 r31139, 2.1.0 r31140
          CLOSED

          Show
          Oleg Egorov added a comment - FIXED IN 2.0.4rc1 r31139, 2.1.0 r31140 CLOSED
          Hide
          Oleksiy Zagorskyi added a comment -

          Note that this fix also fixed another unexpected server's behavior, described in ZBX-5708, linked.

          just in case - Affects Version/s: 2.0.0 <- is really correct.

          Show
          Oleksiy Zagorskyi added a comment - Note that this fix also fixed another unexpected server's behavior, described in ZBX-5708 , linked. just in case - Affects Version/s: 2.0.0 <- is really correct.

            People

            • Assignee:
              Oleg Egorov
              Reporter:
              Jens Berthold
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: