address review comments, fixed typo

Change-Id: I035c86c1114d16d977cfbcb7213ae790301bbcd7
Hi,

As discussed, avoid cp and tar with ignore-failed-read like option. Also,
pass true to Sh.run() as second arg to make sure that if tar fails, the
script does not abort.

Regards,
Ananth


On Sat, Aug 2, 2014 at 3:11 PM, kamleshp <notifications@github.com> wrote:

> In modules/jenkins/files/slave_scripts/contrail-systest-job.rb:
>
> > @@ -240,7 +240,21 @@ def verify_contrail
> >      return exit_code
> >  end
> >
> > -def run_sanity(fab_test)
> > +def save_logs(fab_test, build_id)
> > +    #some tests failed, tar the /var/log folder and save it
> > +    filename = 'var_logs.tar.bz2'
> > +    logfile = "/tmp/#{filename}"
> > +    ci_systestlogfile = "/ci-admin/failed_systest_logs/#{build_id}"
> > +    Sh.run("ssh #{@vms.first.vmname} cp -rf /var/log /tmp")
> > +    Sh.run("ssh #{@vms.first.vmname} tar -cvjf #{logfile} /tmp/log", true)
>
> it should work, we dont need exit code. i change to following. Is that ok?
> Sh.run("ssh #{@vms <https://github.com/vms>.first.vmname} tar -cvjf
> #{logfile} /tmp/log")
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Juniper/contrail-infra-config/pull/25/files#r15731630>
> .
>