Commit 3d835f7d made two incorrect assumptions that lead to instance moves failing for plain instances. - The Import/Export interface is available at the level of block devices, not (as was assumed in the said commit) at the level of configuration objects. - The Import/Export functions provide an argv vector not a single string; also the quoted version thereof is not a parameter so be substituted into a shell template (the quoted string does contain several characters with special meaning to the shell, e.g., spaces). Fix this now.
Signed-off-by: Klaus Aehlig <[email protected]> --- lib/backend.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/backend.py b/lib/backend.py index 519e00d..73e907f 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -4971,12 +4971,13 @@ def _GetImportExportIoCommand(instance, mode, ieio, ieargs): elif ieio == constants.IEIO_RAW_DISK: (disk, ) = ieargs + real_disk = _OpenRealBD(disk) if mode == constants.IEM_IMPORT: - suffix = utils.BuildShellCmd("| %s", disk.Import()) + suffix = "| %s" % utils.ShellQuoteArgs(real_disk.Import()) elif mode == constants.IEM_EXPORT: - prefix = utils.BuildShellCmd("%s |", disk.Export()) + prefix = "%s |" % utils.ShellQuoteArgs(real_disk.Export()) exp_size = disk.size elif ieio == constants.IEIO_SCRIPT: -- 2.4.3.573.g4eafbef
