[pve-devel] [PATCH container 1/2] Fix #1544: add skiplock to lxc api path

Dominik Csapak d.csapak at proxmox.com
Wed Mar 21 10:13:35 CET 2018


one situation where a skiplock might be necessary is the following

when implementing an api client and for whatever reason,
you have to do multiple config changes which you cannot set 
simultaneously (i can think of only one concrete example, regenerating a 
cloud init image currently, ejecting and inserting a cdrom)
would have to be under a lock so the workflow would have to be the 
following:

lock vm
config change 1 (with skiplock)
config change 2 (with skiplock)
...
unlock vm (with skiplock)

but maybe there is a different approach?
e.g. having an api call 'execute_locked_commands' which
creates a lock and a list of api calls, and executes them
(would not solve the problem if you have to feed output from call1 to 
call2 etc) and unlocks it again




More information about the pve-devel mailing list