[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 20/62] ts-guests-nbd-mirror: use target_{get, put}file_root to transfter cfg
From: Wei Liu <wei.liu2@xxxxxxxxxx> The original code used target_cmd_output_root which caused a trailing new line to be deleted, which caused libvirt converter to fail. It wasn't discovered until now because we appended too many "\n". Use target_{get,put}file_root to do the job. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- ts-guests-nbd-mirror | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ts-guests-nbd-mirror b/ts-guests-nbd-mirror index 7ea31f7c..06903aaa 100755 --- a/ts-guests-nbd-mirror +++ b/ts-guests-nbd-mirror @@ -154,8 +154,11 @@ sub shuffleconfigs () { my $gn= $gns[$i]; my $gho= $ghos[$i]; my $cfgpath= $r{ "$gho->{Guest}_cfgpath" }; - my $cfgdata= target_cmd_output_root($sho,"cat $cfgpath"); - target_putfilecontents_root_stash($cho,10,$cfgdata,$cfgpath); + my $file= $cfgpath; + $file=~ s,/,-,g; + $file= "$stash/".hostnamepath($cho)."--$file"; + target_getfile_root($sho, 60, $cfgpath, $file); + target_putfile_root($cho, 60, $file, $cfgpath); } } -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |