-
Problem report
-
Resolution: Fixed
-
Trivial
-
7.0.0, 7.2.0alpha1 (master)
-
None
-
S24-W28/29, S24-W30/31
-
0.5
Steps to reproduce:
Configure a network discovery operation with an action that has an operation that deletes host tags from the database.
For example, testDiscoveryRules_opDelHostTags() in ui/tests/integration/testDiscoveryRules.php may be used.
Result:
The tags are deleted, but the warning message appears in Zabbix server log:
686515:20240627:173633.027 failed to delete tags from a discovered host, hostid = 10633
An audit log entry saying that the tags are deleted is not added.
Expected:
No warning message is written. The audit log entry is written.
Cause:
In discovered_host_tags_save(), this condition is used
if (ZBX_DB_OK == zbx_db_execute("%s", sql))
instead of this one
if (ZBX_DB_OK <= zbx_db_execute("%s", sql))
zbx_db_execute() returns the number of rows affected. For 2 deleted tags, it would return 2.
ZBX_DB_OK == 0
- caused by
-
ZBXNEXT-6524 Add "Add Host Tag" to operations for autoregistration action
-
- Closed
-