New issue
Advanced search Search tips

Issue 899285 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Fuchsia
Pri: 3
Type: Bug



Sign in to add a comment

Can't connect to device via fuchsia run scripts

Project Member Reported by scottmg@chromium.org, Oct 26

Issue description

$ gn clean out/fuch && rm -rf out/fuch/bin && ninja -C out/fuch -j1000 http_service_tests
ninja: Entering directory `out/fuch'
[0->1/1 ~1] Regenerating ninja files
[0->5040/5040 ~1] STAMP obj/webrunner/net_http/http_service_tests.stamp
$ out/fuch/bin/run_http_service_tests -d -v
Traceback (most recent call last):
  File "/usr/local/google/work/cr/src/build/fuchsia/test_runner.py", line 117, in <module>
    sys.exit(main())
  File "/usr/local/google/work/cr/src/build/fuchsia/test_runner.py", line 90, in main
    with GetDeploymentTargetForArgs(args) as target:
  File "/usr/local/google/work/cr/src/build/fuchsia/common_args.py", line 97, in GetDeploymentTargetForArgs
    args.port, args.ssh_config, system_log_file)
  File "/usr/local/google/work/cr/src/build/fuchsia/device_target.py", line 49, in __init__
    boot_data.GetSSHConfigPath(output_dir))
  File "/usr/local/google/work/cr/src/build/fuchsia/common.py", line 18, in EnsurePathExists
    raise IOError('Missing file: ' + path)
IOError: Missing file: /usr/local/google/work/cr/src/out/fuch/ssh_config



 
Cc: kmarshall@chromium.org
One thing that works is to run on qemu, then run on device. It's subtle though! Because you have to make sure that when you do the device run the device *isn't* already booted so that the run script regenerates the ssh config.

So if you try a device run (which causes a netboot) but fails ssh, then a qemu to generate ssh, and then don't reboot the device before the next attempt at device boot, I think what happens is it tries to use the ssh config from the previous run and then you get a failure to connect because the key is wrong, like:

$ ssh -F /usr/local/google/work/cr/src/out/fuch/ssh_config fe80::baae:edff:feea:5ca5%eno1 -p 22 true
fuchsia@fe80::baae:edff:feea:5ca5%eno1: Permission denied (publickey,keyboard-interactive).
Status: Assigned (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 30

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/22d1b7117a6ee9a257d06a699ad257e3bf41be57

commit 22d1b7117a6ee9a257d06a699ad257e3bf41be57
Author: Kevin Marshall <kmarshall@chromium.org>
Date: Fri Nov 30 23:29:19 2018

Fuchsia: Generate SSH credentials for device boots.

This fixes a bug in the runner scripts which prevented SSH cred
generation for device boots, but allowed emulator run credentials to
be re-used. The issue only manifested on clean builds with no prior
emu runs.

Bug: 899285
Change-Id: Icfb2b734bf527b44cb671b08ee7d21563ae82a8c
Reviewed-on: https://chromium-review.googlesource.com/c/1355850
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612839}
[modify] https://crrev.com/22d1b7117a6ee9a257d06a699ad257e3bf41be57/build/fuchsia/boot_data.py
[modify] https://crrev.com/22d1b7117a6ee9a257d06a699ad257e3bf41be57/build/fuchsia/device_target.py

Sign in to add a comment