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.sando...@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to