Symptoms
Task Cleanup host hostname01.domain.tld
fails with the following output:
Foreign key 'hd_host_fk3' violation while executing 'error executing work'.
The following constraint violation can be found in poa.log
during the task execution:
Caused by: java.sql.SQLException: ERROR: update or delete on table "hosts" violates foreign key constraint "hd_host_fk3" on table "home_directories" Detail: Key (host_id)=(360) is still referenced from table "home_directories". Query: DELETE FROM hosts WHERE host_id = ? Parameters: [360]
Another example in poa.log
:
Caused by: java.sql.SQLException: ERROR: update or delete on table "hosts" violates foreign key constraint "psa_fk1" on table "psa" Detail: Key (host_id)=(25180) is still referenced from table "psa". Query: DELETE FROM hosts WHERE host_id = ? Parameters: [25180]
Cause
The issue occurs due to leftover records in OA DB. Exact reason has not been determined.
Resolution
Please contact Odin technical support to fix the issue.