PFQ Failed to Uprev to [insert version] |
||
Issue descriptionWhen Android tree is red and no new Android image is available, the uprev step would fail with gsutil ACL issue. https://uberchromegw.corp.google.com/i/chromeos/builders/veyron_minnie-cheets-android-pfq/builds/440 cros_mark_android_as_stable: Unhandled exception: Traceback (most recent call last): File "/mnt/host/source/chromite/bin/cros_mark_android_as_stable", line 164, in <module> commandline.ScriptWrapperMain(FindTarget) File "/mnt/host/source/chromite/lib/commandline.py", line 834, in ScriptWrapperMain ret = target(argv[1:]) File "/mnt/host/source/chromite/scripts/cros_mark_android_as_stable.py", line 397, in main version_to_uprev, subpaths, options.arc_bucket_url, acls) File "/mnt/host/source/chromite/scripts/cros_mark_android_as_stable.py", line 230, in CopyToArcBucket gs_context.ChangeACL(arc_path, acl_args_file=acl) File "/mnt/host/source/chromite/lib/gs.py", line 893, in ChangeACL self.DoCommand(['acl', 'ch'] + acl_args + [upload_url]) File "/mnt/host/source/chromite/lib/gs.py", line 654, in DoCommand raise GSCommandError(e.msg, e.result, e.exception) chromite.lib.gs.GSCommandError: return code: 1; command: /mnt/host/source/.cache/common/gsutil_4.19.tar.gz/gsutil/gsutil -o 'Boto:num_retries=10' acl ch -g 00b4903a97fb6344be6306829e053825e18a04ab0cc5513e9585a2b8c9634c80:FULL_CONTROL -g 00b4903a97ce95daf4ef249a9c21dddd83fdfb7126720b7c3440483b6229a03c:READ -g google.com:READ -u overlay.cyan.cheets.private@gmail.com:READ gs://chromeos-arc-images/builds/git_mnc-dr-arc-dev-linux-cheets_x86-user/2982108/cheets_x86-img-2982108.zip CommandException: Failed to set acl for gs://chromeos-arc-images/builds/git_mnc-dr-arc-dev-linux-cheets_x86-user/2982108/cheets_x86-img-2982108.zip. Please ensure you have OWNER-role access to this resource. cwd=None, extra env={'BOTO_CONFIG': '/home/chrome-bot/.boto'}
,
Jun 21 2016
gs_context.ChangeACL(arc_path, acl_args_file=acl) would change the owner from chrome.bot@gmail to chrome.int.bot@gmail. If the android image is the same with previous try and is already copied into GS, the set ACL would fail because the owner mismatched. One possible fix is to check the ACL before set.
,
Jan 12 2017
No longer occurs again. |
||
►
Sign in to add a comment |
||
Comment 1 by hctsai@chromium.org
, Jun 21 2016# Check a pre-existing file with the original source. if gs_context.Exists(arc_path): if (gs_context.Stat(targetfile.url).hash_crc32c != gs_context.Stat(arc_path).hash_crc32c): logging.warn('Removing incorrect file %s', arc_path) gs_context.Remove(arc_path) else: logging.info('Skipping already copied file %s', arc_path) needs_copy = False # Copy if necessary, and set the ACL unconditionally. # The Stat() call above doesn't verify the ACL is correct and # the ChangeACL should be relatively cheap compared to the copy. # This covers the following caes: # - handling an interrupted copy from a previous run. # - rerunning the copy in case one of the googlestorage_acl_X.txt # files changes (e.g. we add a new variant which reuses a build). if needs_copy: logging.info('Copying %s -> %s (acl %s)', targetfile.url, arc_path, acl) gs_context.Copy(targetfile.url, arc_path, version=0) gs_context.ChangeACL(arc_path, acl_args_file=acl)