-
Notifications
You must be signed in to change notification settings - Fork 141
Description
Hello Team,
I am facing an issue during the execution of Litmus testcase using v3.20.x.
[ Background ]
I was trying to run the litmus experiments using v3.16.0 and everything was working well.
I upgraded my Litmus image to v3.20.0 and my testcases starts failing.
[ User experience ]
If I try to run the a new litmus experiment, it works fine and then if I retry the same experiment, then experiment FAILS with below error:
time="2025-08-26T11:22:12Z" level=error msg="failed to update chaosresult, err: could not update chaos result\n --- at /litmus-go/pkg/result/chaosresult.go:143 (InitializeChaosResult) ---\nCaused by: {\"errorCode\":\"CHAOS_RESULT_CRUD_ERROR\",\"reason\":\"resource name may not be empty\",\"target\":\"{name: restartnode7-node-restart, namespace: sdm207}\"}" ubuntu@bootstrap-rocket-nis2-20:~/ajay/node-restart$
[ Issue ]
In v3.20, we are fetching the ChaosResult using chaosUID as a label selector.
In the new/first run, the litmus experiment successfully fetch the ChaosResult because ChaosResult was created by the running engine and both engine and ChaosResult object have same UID and experiment ran SUCCESSFULLY.
However, if we re-run the same experiment, then again engine tried to get the ChaosResult using UID of new engine and it couldn't find the ChaosResult and then engine tries to create a new chaosResult but it fails as ChaosResult with same name is already exists in the system
https://github.com/litmuschaos/litmus-go/blob/master/pkg/clients/litmus.go#L50
[Impacted version]
v3.20.x
If anyone confirm this issue then I will be happy to contribute to litmus community by fixing this issue.