Environment:
- Yugaware Platform v2.5 and older
Issue:
While creating a universe if you use the name of previous non-existent universe then below error will be displayed:
Failed to execute task java.util.concurrent.FutureTask@2d47b172, hit error io.ebean.DataIntegrityException: Error[ERROR: update or delete on table "universe" violates foreign key constraint "fk_universe_uuid" on table "alert_definition" Detail: Key (universe_uuid)=(6b44b2c0-6ea1-4718-9306-c5d4c6f4bd0a) is still referenced from table "alert_definition".].
The above occurs due to the reference of the universe name in the public.alert_definition table.
For e.g: Create a universe with name new-lalani-9 and then delete it.
If universe with name new-lalani-9 is recreated, the error mentioned above will occur.
Resolution:
Backup the database
postgres pg_dump -U postgres yugaware > ~/yugaware.dump
Find the universe_uuid
SELECT universe_uuid FROM public.universe WHERE name = 'new-lalani-9';
Delete references to the universe
BEGIN; DELETE FROM public.alert_definition WHERE universe_uuid = '6b44b2c0-6ea1-4718-9306-c5d4c6f4bd0a'; DELETE FROM public.universe WHERE universe_uuid = '6b44b2c0-6ea1-4718-9306-c5d4c6f4bd0a'; COMMIT;
Note
The instances that were previously used for this universe have been removed from node_instance
--For Example --
Comments
0 comments
Please sign in to leave a comment.