[pve-devel] [PATCH cluster 1/1] datacenter config: Actually write the replication config

Maximiliano Sandoval m.sandoval at proxmox.com
Fri Jul 18 10:13:48 CEST 2025


We get the following error without this patch:

```
$ pvesh set /cluster/options
400 validation error in '/etc/pve/datacenter.cfg'
replication: type check ('string') failed - got HASH
```

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 src/PVE/DataCenterConfig.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
index 3d15643..c6d56c1 100644
--- a/src/PVE/DataCenterConfig.pm
+++ b/src/PVE/DataCenterConfig.pm
@@ -615,6 +615,10 @@ sub write_datacenter_config {
         $cfg->{migration} = PVE::JSONSchema::print_property_string($migration, $migration_format);
     }
 
+    if (ref(my $replication = $cfg->{replication})) {
+        $cfg->{replication} = PVE::JSONSchema::print_property_string($replication, $replication_format);
+    }
+
     if (defined(my $next_id = $cfg->{'next-id'})) {
         $next_id = parse_property_string($next_id_format, $next_id) if !ref($next_id);
 
-- 
2.39.5





More information about the pve-devel mailing list