I’ve use case where I want to rollback the configs if maapi.candidateCommit() is failed.
Here are the steps we perform.
- Push configs without candidate db lock
- Transaction completed successfully (applyTransaction and finishTransaction)
- Execute Mappi.commitCandidate
While executing Maapi.candidateCommit, getting some access denied error due to nacm rule configured to deny for a particular path. Now due to this we fail the request, but configs are still present in candidate DB. We can use candidateReset method to copy the running into Candidate DB. But we don’t know what other configs are present in candidate DB as we don’t lock it before pushing configs.
Is there a way to rollback only a specific transaction configs and keep the rest in candidate?
Also is there a way an api to copy running into Candidate without discarding existing changes in Candidate?