]> git.proxmox.com Git - pve-cluster.git/commitdiff
datacenter.cfg write: retransform migration property to string
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 2 May 2018 08:59:54 +0000 (10:59 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 2 May 2018 12:33:49 +0000 (14:33 +0200)
 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@proxmox.com>
(cherry picked from commit 08115244e417912051fac26f0b5f7b339349b7de)

data/PVE/Cluster.pm

index 1ac5666de623fe8a73334e048bfe8e0d0c19783c..8f529ab1aa2c143cd96a86f2f80e469b0591007a 100644 (file)
@@ -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);
 }