I have a node with an external JBOD enclosure connected through two SAS cables. There are ~80 disks in the enclosure, so they show up as ~160 disks on PVE. When opening the "disks" page for this node, the request to /api2/json/nodes/<node_name>/disks/list?include-partitions=1 times out after 30 seconds. I tried running this perl script to time how long it actually takes:
It returns the correct result, but consistently takes about 35 seconds to complete because each call to udevadm+smartctl takes around 200ms. Execsnoop logs attached.
I'll open an issue for a more proper fix (maybe paging or setting the timeout dynamically based on the number of disks). But until then, is there some way to increase the timeout for the API?
Perl:
#!/usr/bin/perl
use strict;
use warnings;
use PVE::Diskmanage;
my $disks = PVE::Diskmanage::get_disks();
# Print the result
use Data::Dumper;
print Dumper($disks);
It returns the correct result, but consistently takes about 35 seconds to complete because each call to udevadm+smartctl takes around 200ms. Execsnoop logs attached.
I'll open an issue for a more proper fix (maybe paging or setting the timeout dynamically based on the number of disks). But until then, is there some way to increase the timeout for the API?