[pve-devel] [PATCH common] Allow WORKER_FLAG to be set manually for pvesr to avoid low timeouts
Fabian Ebner
f.ebner at proxmox.com
Tue Oct 29 11:56:01 CET 2019
We currently have a 5 seconds timeout for zfs_request for non-workers and
that is too low for some use cases of pvesr. If we can set the WORKER_FLAG
manually, we can work around the issue.
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
User report where zfs destroy and zfs snapshot time out [0].
Previous discussion on the mailing list [1].
[0]: https://forum.proxmox.com/threads/timeout-beim-l%C3%B6schen-des-entfernen-replikats-bei-entfernung-der-replikation.58467/
[1]: https://pve.proxmox.com/pipermail/pve-devel/2019-October/039281.html
src/PVE/RESTEnvironment.pm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/PVE/RESTEnvironment.pm b/src/PVE/RESTEnvironment.pm
index d5b84d0..6800995 100644
--- a/src/PVE/RESTEnvironment.pm
+++ b/src/PVE/RESTEnvironment.pm
@@ -245,6 +245,16 @@ sub get_request_host {
die "no hostname available in current environment\n";
}
+# FIXME: this is currently only used by pvesr to avoid
+# low timeouts for I/O operations. It should be removed
+# once we have light-weight workers/tasks which do not
+# appear in logs
+sub set_worker_flag {
+ my ($class, $flag) = @_;
+
+ $WORKER_FLAG = $flag;
+}
+
sub is_worker {
my ($class) = @_;
--
2.20.1
More information about the pve-devel
mailing list