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

Parallel execution of Zabbix API host.delete may fail.

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • 7.0.11
    • API (A)
    • None
    • RedHat 9.2-0.13
      MySQL 8.0.36
      httpd-2.4.62-1
      php-fpm-8.0.30-1
      zabbix-7.0.5
    • S25-W20/21
    • 3

      When the host.delete method of the Zabbix API is executed in parallel, host deletion may fail.

      The following issue occurs:

      1. The host.delete method is executed in parallel via the Zabbix API.
      2. Some hosts fail to be deleted.

      Here are the execution result messages.
      The messages are long, so some parts have been omitted.
      Please check the full messages in the attached text file. Parallel_execution_results_of_host.delete.txt

      [vagrant@alma9 ~]$ python3 ./host_delete_parallel_singleAuth.py
      [OK] Host 10638 deleted: {'hostids': ['10638']}
      [ERROR] Host 10639 delete failed: {'code': -32500, 'message': 'Application error.', 'data': 'DBEXECUTE_ERROR',  ...
      [ERROR] Host 10637 delete failed: {'code': -32500, 'message': 'Application error.', 'data': 'SQL statement execution has failed "UPDATE graphs SET ymin_type=\'0\',ymin_itemid=NULL WHERE (ymin_itemid IN (\'47679\',\'47680\', ...
      [OK] Host 10640 deleted: {'hostids': ['10640']}
      [ERROR] Host 10641 delete failed: {'code': -32500, 'message': 'Application error.', 'data': 'DBEXECUTE_ERROR',  ...
      [OK] Host 10643 deleted: {'hostids': ['10643']}
      [ERROR] Host 10644 delete failed: {'code': -32500, 'message': 'Application error.', 'data': 'SQL statement execution has failed "INSERT INTO housekeeper (housekeeperid,tablename,field,value) VALUES (\'192356\',\'events\',\'lldruleid\',\'48984\'), ...
      [ERROR] Host 10642 delete failed: {'code': -32500, 'message': 'Application error.', 'data': 'SQL statement execution has failed "UPDATE graphs SET ymin_type=\'0\',ymin_itemid=NULL WHERE (ymin_itemid IN (\'48529\',\'48530\', ...
      [OK] Host 10646 deleted: {'hostids': ['10646']}
      [ERROR] Host 10645 delete failed: {'code': -32500, 'message': 'Application error.', 'data': 'SQL statement execution has failed "DELETE FROM hosts WHERE hostid=\'10645\'"',  ...
      [vagrant@alma9 ~]$
      

      I have confirmed that the issue also reproduces on version 7.0.12.

        1. Parallel_execution_results_of_host.delete.txt
          38 kB
          Itsuki Karimata

            vmaksimovs Vladimirs Maksimovs
            ikarimata Itsuki Karimata
            Team C
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 2h
                2h