[pve-devel] [PATCH guest-common] increase max reading replication state file size.

Wolfgang Link w.link at proxmox.com
Tue Apr 16 15:37:27 CEST 2019


In this file, the error of a failed job will also be stored.
The default 32768 bytes are not very much.

This file is on the local filesystem so there is no filesystem
size restrictions like in /etc/pve.
---
 PVE/ReplicationState.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/ReplicationState.pm b/PVE/ReplicationState.pm
index 75d34ba..2bf4fc9 100644
--- a/PVE/ReplicationState.pm
+++ b/PVE/ReplicationState.pm
@@ -31,7 +31,8 @@ sub read_state {
 
     return {} if ! -e $state_path;
 
-    my $raw = PVE::Tools::file_get_contents($state_path);
+    # max file size = 1048476 = 1MB
+    my $raw = PVE::Tools::file_get_contents($state_path, 1048476);
 
     return {} if $raw eq '';
 
-- 
2.11.0





More information about the pve-devel mailing list