[pve-devel] [PATCH container] cleanup OVZ config recovery

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Apr 21 09:19:02 CEST 2016


$conf->{rootfs} is supposed to be the property string value,
not the parsed property string. since this method is called
only twice (once for retrieving the rootfs information only,
once for retrieving the config only) and the second call
never needs the 'rootfs' part of the configuration, we can
safely not set it instead of introducing ugly workarounds
(e.g. setting a fake volume path or worse).
---
 src/PVE/VZDump/ConvertOVZ.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/VZDump/ConvertOVZ.pm b/src/PVE/VZDump/ConvertOVZ.pm
index 35fbd70..8942453 100644
--- a/src/PVE/VZDump/ConvertOVZ.pm
+++ b/src/PVE/VZDump/ConvertOVZ.pm
@@ -314,7 +314,7 @@ sub convert_ovz {
 
    $conf->{hostname} = $ovz_conf->{hostname}->{value};
 
-   $conf->{rootfs} = { size => $disksize, mp => '/' };
+   my $rootfsinfo = { size => $disksize, mp => '/' };
 
-   return wantarray ? ($conf, $conf->{rootfs}) : $conf;
+   return wantarray ? ($conf, $rootfsinfo) : $conf;
 }
-- 
2.1.4




More information about the pve-devel mailing list