api context lock cannot be undone

alexskysilk

Distinguished Member
Oct 16, 2015
1,984
428
153
Chatsworth, CA
www.skysilk.com
In the API reference, context set /api2/json/nodes/{node}/lxc/{vmid}/config/lock should be able to reset a container's lock flag, but actually issuing the command errors out with

no 'set' handler for 'nodes/nodeid/lxc/ctid/config/lock'

Does this context work, and what am I doing wrong?
 
Can you try something like:

Code:
pvesh set /nodes/NODEID/lxc/CTID/config -delete lock

A bit non-intuitive at first. config has no lock subpath and secondly you could only use the lock parameter to set a new lock not to clear one completely, that holds true for all config parameters.
Maybe we could add sub paths for properties and allow a delete on them... then "pvesh delete /nodes/NODEID/lxc/CTID/config/lock" could work.
 
issuing the command

pvesh set /nodes/NODEID/lxc/CTID/config -delete lock

results in "CT is locked (snapshot-delete)"

actual lock state isnt removed. Incidentally, this container is locked for a snapshot-delete but no snapshot task is pending, which is how this odyssey started.
 
you can add the '-skiplock' parameter to the api call of deleting the lock
 
mhmm yeah you are right ( i looked at the qemu api calls and not the container ones)
at the moment for containers it is only possible to unlock it via 'pct unlock VMID'
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!