Increase timeout for cfs lock

jalict

New Member
Dec 2, 2022
16
1
3
Hey,

We build a more cattle-like orchestrator for our build system, and if we suddenly spin up a whole bunch of Link Clones (+8 clones of same gold template) at once, then it will fail due to cfg lock timeout

Code:
create linked clone of drive efidisk0 (storage01:base-103-disk-0/base-105-disk-0)
trying to acquire cfs lock 'storage-storage01' ...
trying to acquire cfs lock 'storage-storage01' ...
trying to acquire cfs lock 'storage-storage01' ...
trying to acquire cfs lock 'storage-storage01' ...
trying to acquire cfs lock 'storage-storage01' ...
trying to acquire cfs lock 'storage-storage01' ...
trying to acquire cfs lock 'storage-storage01' ...
trying to acquire cfs lock 'storage-storage01' ...
trying to acquire cfs lock 'storage-storage01' ...
TASK ERROR: clone failed: cfs-lock 'storage-storage01' error: got lock request timeout

Is there any way to increase this timeout? I am OK with waiting for them to finish up sequentially.
 
Last edited:
I think the timeout is hard coded, ie not user changeable. You could probably find it in the code and update directly. That said, increasing timeout just leads to more racing later, what if it takes a second longer next time. A much better approach is to wrap the clone in some "checker" script/function that you can easily control and that wont be overwritten on next upgrade.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
for now I just wrapped my requests in mutex locks so they wait on each other to finish.

I did look into ZFSPlugin.pm and it did seem to have a $timeout variable, but couldn't find the exact declaration.

Changing the timeout would also be nice, so if anyone knows, please write in her!

but for now I'll just go with my own locks :)
 

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!