Automation · NETCONF
Locking
Cheat sheet · https://pcornel.dk/topic.php?topic=5615
Answer
NETCONF locking (lock and unlock operations) gives one session exclusive access to a datastore while it makes changes, preventing other sessions or users from editing at the same time.
Remember
- lock gives one session exclusive access to a datastore.
- Always unlock, even after errors.
- Lock fails if another session holds it.
First checks
- <lock target=candidate/running> — exclusive access
- <unlock> in finally — release
- Lock-denied handling — retry/wait
Verify in this order
lock → edit → commit → unlock
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5615