Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-8128

Macro inheritance problem

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 2.2.3
    • Server (S)
    • None
    • Red Hat Enterprise 5, Zabbix 2.2.3

      See ZBX-8094.

      When defining a macro with the same name in two different templates attached to the same hosts, macro resolution is not correct.
      In my opinion, the resolution path should be from the closest enclosing definition up to root (global macros) in the end.
      Example (ZBX-8094): Macro {$BASE_OID} defined in two templates attached to the same host. Several items were defined using this macro in one of the templates but at resolution, {$BASE_OID} was not taken from the enclosing template of the item but from the other template. The resolution should have gone from host definition, if not present, check immediate template where the item is defined, then crawl up the nested templates if any and in the end, check global macro definitions. It should be very similar to C++ inheritance algorithm, it should be predictable, repeatable at every execution and should prevent infinite loops.

            Unassigned Unassigned
            little_martian Little Martian
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: