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

template full cloning fails when trigger prototype depends on regular trigger with recovery expression

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 6.0.19
    • Frontend (F)
    • None

      Summary should be pretty much clear.

      Example minimalistic template attached zbx_export_templates-not-cloning.yaml

      Import to get "Example-not-cloning" template created and try to full clone it, you will get an error (line wraps are added for readability):

      Trigger prototype 
      "Interface {#IFINDEX}: Packet Loss on Link"
      cannot depend on the non-existent trigger 
      "direct trigger" 
      on the template 
      "Example-not-cloning-dupe". 
      [templates.php:399 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CDiscoveryRule->copy() → CDiscoveryRule->copyDiscoveryRule() → CDiscoveryRule->copyTriggerPrototypes() → CApiService::exception() in include/classes/api/services/CDiscoveryRule.php:922]
      

       
      Then go to the single trigger on template level and change its mode to just Expression (without Recovery) and now you will be able to clone the template.

      It should not be this way, something is wrong in order of routines, when doing full clone such template.

      Tested on current git rev, Zabbix 6.0.20rc1

            zabbix.dev Zabbix Development Team
            zalex_ua Oleksii Zagorskyi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: