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

actions/condition caching in 3.0 caused wrong AND/OR expression evaluation in some cases

    Details

      Description

      Previously when processing conditions they were taken from database with "order by conditiontype" and this block of code was working correctly:

      case CONDITION_EVAL_TYPE_AND_OR:
      				if (old_type == condition->conditiontype)
      				{
      					if (SUCCEED == condition_result)
      						ret = SUCCEED;
      				}
      				else
      				{
      					if (FAIL == ret)
      						goto clean;
      
      					ret = condition_result;
      					old_type = condition->conditiontype;
      				}
      
      				break;
      

      Now, in 3.0, conditions are taken from configuration cache where they, seems, are sorted by "conditionid" instead of "conditiontype".

      If a condition type A will be evaluated to FAIL after evaluation of another condition type B, then that FAIL simply overwrites possible SUCCESS of earlier evaluated condition type A.

      As a result - an action which worked in 2.4 stops to work in 3.0 (for sure!) or vice versa (I guess).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zalex_ua Oleksiy Zagorskyi
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: