-
Problem report
-
Resolution: Unresolved
-
Minor
-
7.4.0alpha1 (master)
-
Sprint candidates
-
1
An error occurs when importing files with different interfaces and discovery in the first file.
Steps to reproduce:
1. Go to Hosts;
2. Import first file zbx_export_hosts 1.yaml from attachments;
3. Import second file zbx_export_hosts 2.yaml .
Result:
Error in logs:
pg_query(): Query failed: ERROR: update or delete on table "interface" violates foreign key constraint "c_items_4" on table "items" DETAIL: Key (interfaceid)=(80) is still referenced from table "items". [zabbix.php:17 -> require_once() -> ZBase->run() -> ZBase->processRequest() -> CController->run() -> CControllerPopupImport->doAction() -> CApiWrapper->__call() -> CFrontendApiWrapper->callMethod() -> CApiWrapper->callMethod() -> CApiWrapper->callClientMethod() -> CLocalApiClient->callMethod() -> CConfiguration->import() -> CConfigurationImport->import() -> CConfigurationImport->processHosts() -> CHostImporter->import() -> CHost->update() -> CHost->updateForce() -> CHost->massUpdate() -> CHostInterface->replaceHostInterfaces() -> CHostInterface->delete() -> DB::delete() -> DBexecute() -> pg_query() -> CConfigFile->{closure}() in include/db.inc.php:255]
- If you delete the discovery from File 1 and leave the host empty, the error will not occur.
- If you add an item instead , the system triggers the correct notification: