Dome: When failed updating a resource, Umpire will stay in "staged" mode and reject any further tasks, even if the failed one is canceled. |
|||
Issue description
What steps will reproduce the problem?
(1) Open Dome, select a board (ok if empty)
(2) Click UPDATE on a component, for example HWID
(3) Upload a garbage file for it.
(4) Dismiss the error, remove the task on right-bottom corner.
(5) Click UPDATE again
(6) Upload a correct file
What is the expected result?
Success
What happens instead?
Failure:
Internal Server Error
{"detail":"Cannot stage config file, make sure no one is editing Umpire config at the same time, and there is no staging config exists. Error message: <Fault -32500: 'Traceback (most recent call last):\\n File \"/usr/lib/python2.7/site-packages/twisted/web/resource.py\", line 250, in render\\n return m(request)\\n File \"/usr/lib/python2.7/site-packages/twisted/web/xmlrpc.py\", line 167, in render_POST\\n d = defer.maybeDeferred(function, request, *args)\\n File \"/usr/lib/python2.7/site-packages/twisted/internet/defer.py\", line 150, in maybeDeferred\\n result = f(*args, **kw)\\n File \"/usr/local/factory/py_pkg/cros/factory/umpire/web/xmlrpc.py\", line 90, in _WrapProcedure\\n result = defer.maybeDeferred(method, *args, **kwargs)\\n--- <exception caught here> ---\\n File \"/usr/lib/python2.7/site-packages/twisted/internet/defer.py\", line 150, in maybeDeferred\\n result = f(*args, **kw)\\n File \"/usr/local/factory/py_pkg/cros/factory/umpire/rpc_cli.py\", line 166, in StageConfigFile\\n self.env.StageConfigFile(config_path, force=force)\\n File \"/usr/local/factory/py_pkg/cros/factory/umpire/umpire_env.py\", line 245, in StageConfigFile\\n self.staging_config_file)\\ncros.factory.umpire.common.UmpireError: Unable to stage a config file as another config is already staged. Check \\'/var/db/factory/umpire/staging_umpire.yaml\\' to decide if it should be deployed (use \"umpire deploy\"), edited again (\"umpire edit\") or discarded (\"umpire unstage\").\\n'>"}
... even if the task is canceled
umpire status
Staging config exists (umpire.711dcfe3e8eef1f40dfe152f5cd0c918.yaml)
Youcheng thinks this is a bug in Dome.
,
Jun 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory/+/48145033e40f86208f29a919d43e88952c990253 commit 48145033e40f86208f29a919d43e88952c990253 Author: Hung-Te Lin <hungte@chromium.org> Date: Thu Jun 29 08:16:17 2017 umpire: Abort importing resource if version can't be identified. Dome expects 'version' to be available in all Umpire payloads JSON files, however Umpire and cros_payload both don't fail if version is missing or empty. It should be either cros_payload or Umpire to abort invalid resource. Currently the version is detected and written into JSON config by cros_payload, but in future if we want to make cros_payload more generic, it will be the caller of cros_payload to find out resource property and set by 'cros_payload add_meta' command. As a result, since Umpire is the one knowing "resources need version for Dome to use" and the one that really reads version (for toolkit to update), we want Umpire to check and abort if version is empty or missing. BUG= chromium:737465 TEST=manually tested. cros_docker.sh umpire test Change-Id: I763f48cde7bce908e928363b3d6d5f4a7be1ab90 Reviewed-on: https://chromium-review.googlesource.com/552420 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org> Reviewed-by: Youcheng Syu <youcheng@chromium.org> [modify] https://crrev.com/48145033e40f86208f29a919d43e88952c990253/py/umpire/e2e_test/testdata/cros_docker/hwid.gz [modify] https://crrev.com/48145033e40f86208f29a919d43e88952c990253/py/umpire/e2e_test/e2e_test.py [modify] https://crrev.com/48145033e40f86208f29a919d43e88952c990253/py/umpire/commands/testdata/bundle_for_import/setup/static/hwid.gz [modify] https://crrev.com/48145033e40f86208f29a919d43e88952c990253/py/umpire/e2e_test/testdata/cros_docker/bundle_for_import.zip [modify] https://crrev.com/48145033e40f86208f29a919d43e88952c990253/py/umpire/umpire_env.py
,
Jul 14 2017
,
Jan 22 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by youcheng@chromium.org
, Jun 28 2017