New issue
Advanced search Search tips

Issue 693192 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

cros deploy should warn when deploying to downloaded test images

Project Member Reported by jamescook@chromium.org, Feb 16 2017

Issue description

Follow the go/simplechrome workflow, download and install an unsigned test image, hack on chrome.

Setup chroot.
cros_workon start crash-reporter
emerge-link crash-reporter
cros deploy <ip> crash-reporter

Get this failure message:

RunCommandError: return code: 1; command: ssh -p 22 '-oConnectionAttempts=4' '-oUserKnownHostsFile=/dev/null' '-oProtocol=2' '-oConnectTimeout=30' '-oServerAliveCountMax=3' '-oStrictHostKeyChecking=no' '-oServerAliveInterval=10' '-oNumberOfPasswordPrompts=0' '-oIdentitiesOnly=yes' -i /tmp/ssh-tmp3ReZ_o/testing_rsa root@172.18.37.56 -- 'FEATURES=-sandbox' 'PORTAGE_CONFIGROOT=/usr/local' "CONFIG_PROTECT='-*'" 'PKGDIR=/usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7/packages' 'PORTDIR=/usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7' 'PORTAGE_TMPDIR=/usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7/portage-tmp' emerge --usepkg /usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7/packages/chromeos-base/crash-reporter-9999.tbz2 '--root=/'
cmd=['ssh', '-p', '22', '-oConnectionAttempts=4', '-oUserKnownHostsFile=/dev/null', '-oProtocol=2', '-oConnectTimeout=30', '-oServerAliveCountMax=3', '-oStrictHostKeyChecking=no', '-oServerAliveInterval=10', '-oNumberOfPasswordPrompts=0', '-oIdentitiesOnly=yes', '-i', '/tmp/ssh-tmp3ReZ_o/testing_rsa', 'root@172.18.37.56', '--', 'FEATURES=-sandbox', 'PORTAGE_CONFIGROOT=/usr/local', "CONFIG_PROTECT='-*'", 'PKGDIR=/usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7/packages', 'PORTDIR=/usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7', 'PORTAGE_TMPDIR=/usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7/portage-tmp', 'emerge', '--usepkg', u'/usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7/packages/chromeos-base/crash-reporter-9999.tbz2', '--root=/'], extra env={'LC_MESSAGES': 'C'}

Scroll way back and find this other message:

WARNING: One or more repositories have missing repo_name entries:

	/usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.


!!! CONFIG_PROTECT is empty


!!! /usr/local/etc/portage/make.profile is not a symlink and will probably prevent most merges.
!!! It should point into a profile within /usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7/profiles/
!!! (You can safely ignore this message when syncing. It's harmless.)


!!! Problem with sandbox binary. Disabling...



!!! Problem resolving dependencies for /usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7/packages/chromeos-base/crash-reporter-9999.tbz2

emerge: there are no ebuilds to satisfy "chromeos-base/libchrome:395517[cros-debug]".
(dependency required by "chromeos-base/crash-reporter-9999::chromiumos" [binary])
(dependency required by "/usr/local/tmp/cros-deploy/tmp.pzcd6dbnC7/packages/chromeos-base/crash-reporter-9999.tbz2" [argument])
09:36:31: ERROR: Failed to emerge package crash-reporter-9999.tbz2


The underlying issue is that this is a downloaded test image (probably release build?) whereas I built crash-reporter myself (probably debug build?).

There are a few problems here:
* The last error from "cros deploy" isn't the actual problem
* There are lots of "!!!!" errors that aren't the actual problem
* I probably shouldn't be allowed to deploy to a downloaded image anyway

 

Comment 1 by derat@chromium.org, Feb 16 2017

Cc: vapier@chromium.org
Components: -Infra>Client>ChromeOS OS>Packages
I added a bit to https://www.chromium.org/chromium-os/developer-guide#TOC-Making-changes-to-packages-whose-source-code-is-checked-into-Chromium-OS-git-repositories to hopefully help here:

"NOTE: If you skipped to this section without building your own system image, you may run into hard-to-fix dependency problems if build your own versions of system packages and try to deploy them to a system image that was built by a builder. If you run into trouble, try going through the full Building Chromium OS process first and installing your own system image."

With that said, I'm not completely sure of the underlying problem here (a mismatch in the cros-debug USE flag between the test image and James's packages, maybe?). I certainly wouldn't argue against making error messages more readable.

Comment 2 by vapier@chromium.org, Feb 16 2017

the problem is that James installed a release image that is built w/out USE=cros-debug, and now he's trying to deploy packages from his local developer build that are built with USE=cros-debug.

i don't know what "download and install an unsigned test image" means.  there is no such thing as "unsigned" in the CrOS world -- everything is always signed.  dev images are simply signed with well known dev keys.
"unsigned" means go/goldeneye, click on a build, find your board, click "Images", click "unsigned test image".

I guess the label is wrong in that UI?

Regardless, it should would be nice if the "cros deploy" failure message was clearer.

Comment 4 by vapier@chromium.org, Feb 17 2017

the error message isn't from cros deploy, it's from emerge

you can set USE=-cros-debug locally and then rebuild things, and then you can deploy compatible packages.  or deploy all the packages with USE=cros-debug.
I'm not looking to use this workflow. I'm fine building my own image. I want an easy-to-understand error message when it goes wrong.

This is a common problem in many on-device workflows I use. Specifically, everything you see in the last screen full of error messages is only tangentially related to the problem. The actual error is often 40+ lines above. There are also a variety of "normal" error messages you have to know to ignore.

I would *love* something like a single line, somewhere in the last 40 lines, that says: "Error: Cannot emerge, your USE flags do not match, "cros-debug" not found. Are you trying to deploy to a release image?" Or something like that.

Cc: teravest@chromium.org

Sign in to add a comment