[pve-devel] [PATCH cluster 4/5] datacenter.cfg write: retransform migration property to string
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed May 2 10:59:54 CEST 2018
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>
(cherry picked from commit 08115244e417912051fac26f0b5f7b339349b7de)
---
data/PVE/Cluster.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm
index 1ac5666..8f529ab 100644
--- a/data/PVE/Cluster.pm
+++ b/data/PVE/Cluster.pm
@@ -1441,6 +1441,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.14.2
More information about the pve-devel
mailing list