Trying to delete some scenario #24
Replies: 2 comments 1 reply
-
Hello, Thank you for your report! From the report, it looks like you are facing two separate issues:
(1) is a known issue and we're already looking for a fix to introduce in a future version. Meanwhile we can provide you with a way to delete your scenario by dropping to a postgresql shell. Could you provide more information about the error you encounter in (2), such as the log of the failing memory history replay task (as memory history resources can get rather large, sometimes there is a disk space issue during the replay)? To fix (1), you will need the ID of the offending scenario that won't get deleted:
Once you got your scenario ID, you will need to get to a Postgresql shell on your REVEN installation.
From the Postgresql shell, execute the following sql snippet after replacing the \set scenario_id = YOUR_SCENARIO_ID_HERE
DELETE FROM scenario_replayresourcescenariotask WHERE replayscenariotask_ptr_id IN (SELECT task_ptr_id FROM scenario_replayscenariotask WHERE scenario_id = :scenario_id);
DELETE FROM scenario_replayactionscenariotask WHERE replayscenariotask_ptr_id IN (SELECT task_ptr_id FROM scenario_replayscenariotask WHERE scenario_id = :scenario_id);
DELETE FROM scenario_replayscenariotask_dependencies WHERE from_replayscenariotask_id IN (SELECT task_ptr_id FROM scenario_replayscenariotask WHERE scenario_id = :scenario_id) OR to_replayscenariotask_id IN (SELECT task_ptr_id FROM scenario_replayscenariotask WHERE scenario_id = :scenario_id);
WITH deleted_tasks AS (
DELETE FROM scenario_replayscenariotask
WHERE task_ptr_id IN (SELECT task_ptr_id FROM scenario_replayscenariotask WHERE scenario_id = :scenario_id)
RETURNING *
)
DELETE FROM task_task WHERE id in (SELECT task_ptr_id FROM deleted_tasks); If the deletion is successful, the snippet should return the number of deleted rows (e.g. Once the offending replay tasks have been deleted from the database, you should be able to delete the scenario from the scenario list. I hope this message will help you. |
Beta Was this translation helpful? Give feedback.
-
Have the same issue. The problem started to occur with version 2.10.2, with version 2.10.1 I have never encountered it. |
Beta Was this translation helpful? Give feedback.
-
Hello guys,
i'm using the free version
It happened a replay stopped in some weird stage during the we. I don't know if there was some electric power shutdown or whatever but i'm facing now a situation i'm unable to delete the scenario. i got a red box popup with the following error 'ReplayScenarioTask' Object has no attribute 'replayscenariotask_ptr' and i cannot delete it.
The issues are coming now once i'm trying to setup a new scenario nothing related i got some error even on the replay for memory analyzing.
Beta Was this translation helpful? Give feedback.
All reactions