[pve-devel] [PATCH cluster 1/2] datacenter.cfg write: retransform migration property to string
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Dec 1 13:25:12 CET 2017
We use parse_property_string in the parser to make life easier for
code working with the migration format, but we did not retransform
it back when writing datacenter.cfg
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
data/PVE/Cluster.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm
index 9a248ed..df2758f 100644
--- a/data/PVE/Cluster.pm
+++ b/data/PVE/Cluster.pm
@@ -1435,6 +1435,10 @@ sub write_datacenter_config {
$cfg->{migration}->{type} = ($migration_unsecure) ? 'insecure' : 'secure';
}
+ if (my $migration = $cfg->{migration}) {
+ $cfg->{migration} = PVE::JSONSchema::print_property_string($migration, $migration_format);
+ }
+
return PVE::JSONSchema::dump_config($datacenter_schema, $filename, $cfg);
}
--
2.11.0
More information about the pve-devel
mailing list