Skip to content

Commit

Permalink
fluster-on-chromeos: Simplify ssh between client and dut
Browse files Browse the repository at this point in the history
Simplify `ssh` connection between client and DUT by setting
the `/root/.ssh/config` to avoid using `-o StrictHostKeyChecking=no
-o UserKnownHostsFile=/dev/null -i /home/cros/.ssh/id_rsa` flags
on every connection.
Keeps only the first `ssh` connection flags which waits until the
DUT to be available.

Signed-off-by: Denis Yuji Shimizu <[email protected]>
  • Loading branch information
denisyuji committed Oct 25, 2024
1 parent 5345aed commit 61964ea
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions config/runtime/tests/fluster-chromeos.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,14 @@
root@$(lava-target-ip)
cat /etc/os-release > /tmp/osrel.tmp
- cat /tmp/osrel.tmp
- mkdir -p /root/.ssh
- echo "Host *\n\tIdentityFile /home/cros/.ssh/id_rsa" >> /root/.ssh/config
- ssh-keyscan $(lava-target-ip) > /root/.ssh/known_hosts
- lava-test-set stop setup
- >-
scp
-o StrictHostKeyChecking=no
-o UserKnownHostsFile=/dev/null
-i /home/cros/.ssh/id_rsa
./fluster_parser.py root@$(lava-target-ip):/tmp
- >-
/home/cros/ssh_retry.sh
-o StrictHostKeyChecking=no
-o UserKnownHostsFile=/dev/null
-i /home/cros/.ssh/id_rsa
root@$(lava-target-ip)
python3 /tmp/fluster_parser.py --run {{ testsuite_arg }} {{ decoders_arg }} {{ videodec_timeout_arg }} {{ videodec_parallel_jobs_arg }}
- scp ./fluster_parser.py root@$(lava-target-ip):/tmp
- ssh root@$(lava-target-ip) python3 /tmp/fluster_parser.py --run {{ testsuite_arg }} {{ decoders_arg }} {{ videodec_timeout_arg }} {{ videodec_parallel_jobs_arg }}
- lava-test-set start get_results
- >-
scp
-o StrictHostKeyChecking=no
-o UserKnownHostsFile=/dev/null
-i /home/cros/.ssh/id_rsa
root@$(lava-target-ip):/tmp/results.xml /tmp
- scp root@$(lava-target-ip):/tmp/results.xml /tmp
- lava-test-set stop get_results
- >-
/home/cros/ssh_retry.sh
-o StrictHostKeyChecking=no
-o UserKnownHostsFile=/dev/null
-i /home/cros/.ssh/id_rsa
root@$(lava-target-ip)
poweroff && sleep 30 || true
- ssh root@$(lava-target-ip) poweroff && sleep 30 || true
- python3 ./fluster_parser.py --results

0 comments on commit 61964ea

Please sign in to comment.