[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH v2 08/19] ts-guests-nbd-mirror: use target_{get, put}file_root to transfter cfg
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 ca8300d..3032204 100755 --- a/ts-guests-nbd-mirror +++ b/ts-guests-nbd-mirror @@ -115,8 +115,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@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |