New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 658504 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 635702



Sign in to add a comment

cros_sdk creates some cache directories as root, as a result fails other directory create attempts

Project Member Reported by semenzato@chromium.org, Oct 22 2016

Issue description

cbuildbot: Unhandled exception:
Traceback (most recent call last):
  File "/b/build/slave/gnawty-release-master/build/chromite/bin/cbuildbot", line 168, in <module>
    DoMain()
  File "/b/build/slave/gnawty-release-master/build/chromite/bin/cbuildbot", line 164, in DoMain
    commandline.ScriptWrapperMain(FindTarget)
  File "/b/build/slave/gnawty-release-master/build/chromite/lib/commandline.py", line 834, in ScriptWrapperMain
    ret = target(argv[1:])
  File "/b/build/slave/gnawty-release-master/build/chromite/scripts/cbuildbot.py", line 1310, in main
    logging.info('One stage exited early: %s', ex)
  File "/b/build/slave/gnawty-release-master/build/chromite/scripts/cbuildbot.py", line 1307, in main
    _RunBuildStagesWrapper(options, site_config, build_config)
  File "/b/build/slave/gnawty-release-master/build/chromite/scripts/cbuildbot.py", line 215, in _RunBuildStagesWrapper
    osutils.SafeMakedirsNonRoot(options.chrome_root)
  File "/b/build/slave/gnawty-release-master/build/chromite/lib/osutils.py", line 262, in SafeMakedirsNonRoot
    created = SafeMakedirs(path, mode=mode, user=user)
  File "/b/build/slave/gnawty-release-master/build/chromite/lib/osutils.py", line 238, in SafeMakedirs
    os.makedirs(path, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/b/cbuild/internal_master/.cache/distfiles/target-master'
@@@STEP_CURSOR@cbuildbot [gnawty-release]@@@
step returned non-zero exit code: 1
@@@STEP_FAILURE@@@
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/6add77a3e2c1e0fcf327f04fbc969113fdabaf3b

commit 6add77a3e2c1e0fcf327f04fbc969113fdabaf3b
Author: Don Garrett <dgarrett@chromium.org>
Date: Sat Oct 22 06:13:34 2016

Revert "cbuildbot: tie the cache for chrome src per branch"

This reverts commit 3e27271a68c4248267acc05f330bb78a90936838.

BUG= chromium:658504 
TEST=None

Change-Id: I8eb4bc6c445dfd5e7bea0f8184ef1094edc11904
Reviewed-on: https://chromium-review.googlesource.com/401284
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>

[modify] https://crrev.com/6add77a3e2c1e0fcf327f04fbc969113fdabaf3b/scripts/cbuildbot.py

I reviewed the CL that broke things.

https://chromium-review.googlesource.com/#/c/398480/

I just reverted it. Hopefully we can resolve the issue and re-land shortly.
Owner: yueherngl@chromium.org
Whoa that was fast!  Thank you.

Dang. Should've asked for a release trybot for the CL. I forgot that paladins wouldn't run SyncChrome at all, so we skipped the changed code path in cbuildbot.py :(
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 22 2016

Labels: merge-merged-factory-strago-7458.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/f8998de947996fae8bc61541a16a8c709d409ca8

commit f8998de947996fae8bc61541a16a8c709d409ca8
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Sat Oct 22 08:03:50 2016

Revert "cbuildbot: tie the cache for chrome src per branch"

This reverts commit 705d59fd8bc10287d2962e24bd2cf33394d330d1.

BUG= chromium:658504 
TEST=None

Change-Id: If86d39ca80259b905bcb3c670b6688cf76b999f6
Reviewed-on: https://chromium-review.googlesource.com/401285
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>

[modify] https://crrev.com/f8998de947996fae8bc61541a16a8c709d409ca8/scripts/cbuildbot.py

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 22 2016

Labels: merge-merged-factory-glados-7828.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/753ad8c4f908336a43c67c5209d7a4a453885229

commit 753ad8c4f908336a43c67c5209d7a4a453885229
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Sat Oct 22 08:05:34 2016

Revert "cbuildbot: tie the cache for chrome src per branch"

This reverts commit 369716fc245cca748ce907b8640d3d368b4c4cc1.

BUG= chromium:658504 
TEST=None

Change-Id: Ia204cd00e47d93b876fe2788ffe57150e8843e75
Reviewed-on: https://chromium-review.googlesource.com/401286
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>

[modify] https://crrev.com/753ad8c4f908336a43c67c5209d7a4a453885229/scripts/cbuildbot.py

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 22 2016

Labels: merge-merged-factory-reef-8811.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/5805d3f367aa9aa8e6da538f013fa96a3ac44c03

commit 5805d3f367aa9aa8e6da538f013fa96a3ac44c03
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Sat Oct 22 08:06:50 2016

Revert "cbuildbot: tie the cache for chrome src per branch"

This reverts commit 806c51ca5d460d0ff71d896f5d1caf397c427b29.

BUG= chromium:658504 
TEST=None

Change-Id: I8118a1011bd427849d55c527d5688b20631e67ca
Reviewed-on: https://chromium-review.googlesource.com/401287
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>

[modify] https://crrev.com/5805d3f367aa9aa8e6da538f013fa96a3ac44c03/scripts/cbuildbot.py

reverted all the factory branch cherry picks because factory branches were also broken.
I ssh'ed into the buildslave that failed that canary (and nothing since).
The problem is that /b/cbuild/internal_master/.cache/distfiles is owned by root.

This might be because it gets created when we make_chroot and so is owned by root. When we try to make a directory inside it, we fail.

I want to say root ownership of this directory is a bug...
... and here's why.

cros_sdk.py creates .cache/distfiles with osutils.SafeMakeDirs (https://cs.corp.google.com/chromeos_public/chromite/scripts/cros_sdk.py?q=enter_chroot.sh&sq=package:chromeos&dr=C&l=676)
Since this is running as root, .cache/distfiles ends up being owned by root.

then, enter_chroot creates .cache/distfiles/ via user_mkdir (https://cs.corp.google.com/chromeos_public/src/scripts/sdk_lib/enter_chroot.sh?q=enter_chroot.sh&sq=package:chromeos&dr&l=352)
Since enter_chroot is also running as root, it happily creates the subdir for the non root user.

Unless there is a real reason that distfiles needs to b owned by root, we should change cros_sdk.py to use SafeMakeDirsNonRoot
Owner: pprabhu@chromium.org
Status: Started (was: Untriaged)
Aha! We already changed _one_ of the two calls there from root to non root: https://chromium-review.googlesource.com/#/c/174893/

Let's change the other one too!
CL uploaded. Note that we'll still need to manually chown the distfiles directory on all builders for the CL in #1 to be relanded.

Or.... we could extend the hack in SafeMakedirsNonRoot to chown the whole directory parent chain to non root: https://cs.corp.google.com/chromeos_public/chromite/lib/osutils.py?l=263

Thoughts?
Wow, sorry for all the troubles and thanks for reverting the changes. I don't think there's any reason the cache needs to be owned by root? 

RE: #13 
If we can clean all ".cache" directories upfront, do we still need to extend the hack (perhaps it's safer)?

Hi, is this fixed?
Labels: -Pri-0 Pri-1
Summary: cros_sdk creates some cache directories as root, as a result fails other directory create attempts (was: all canaries are red with Permission Denied error in cbuildbot step)
Sorry, I cannibalized the bug for the actual fix. Should've created a different one from the emergency response bug.
Will complete the takeover by renaming and lowering priority.
Project Member

Comment 17 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/06a5056635561d2e322c1ed752c79b4548085999

commit 06a5056635561d2e322c1ed752c79b4548085999
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Sat Oct 22 08:41:44 2016

cros_sdk: Don't make directories as root.

cros_sdk made some cache directories as root which created problems for
non root users working inside it. FixIt.

BUG= chromium:658504 
TEST=unittests, pre-cq

Change-Id: I5c478b93de1982d682c6b93a1e76f7ebf5a8fef1
Reviewed-on: https://chromium-review.googlesource.com/401998
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>

[modify] https://crrev.com/06a5056635561d2e322c1ed752c79b4548085999/scripts/cros_sdk.py

Project Member

Comment 18 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/b26e36ac20a149994bd9a15e57bdfce0c1a62d72

commit b26e36ac20a149994bd9a15e57bdfce0c1a62d72
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Tue Oct 25 20:09:02 2016

lib: Create non-root directory even in a parent path owned by root.

SafeMakedirsNonRoot can now create non-root directories even if the
parent path is owned by root. This extends the steps we take to recover
from mistakes that lead us to create root owned directories.

BUG= chromium:658504 
TEST=- (new) unittest
     - Release trybot with CL:401998 and (reland of) CL:398480

Change-Id: I11f33e86a48031772d943ee9473dfc434d08c41f
Reviewed-on: https://chromium-review.googlesource.com/403368
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/b26e36ac20a149994bd9a15e57bdfce0c1a62d72/lib/osutils_unittest.py
[modify] https://crrev.com/b26e36ac20a149994bd9a15e57bdfce0c1a62d72/lib/osutils.py
[modify] https://crrev.com/b26e36ac20a149994bd9a15e57bdfce0c1a62d72/lib/cros_test_lib.py

I would imagine we would need to cherry-pick the changes (c#17/18) to the rest of the branches? If so, I will do it on the factory branches where c#1 applies.

Thanks.
Yep, we'll need those on the factory branches. Let's reland https://chromium-review.googlesource.com/#/c/403369/ and make sure canaries go green, then we'll CP to branches.
Blocking: 635702
Project Member

Comment 22 by bugdroid1@chromium.org, Oct 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/80c3be82b19c64f5e639b7f67c823af889903be3

commit 80c3be82b19c64f5e639b7f67c823af889903be3
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Tue Oct 25 20:09:02 2016

lib: Create non-root directory even in a parent path owned by root.

SafeMakedirsNonRoot can now create non-root directories even if the
parent path is owned by root. This extends the steps we take to recover
from mistakes that lead us to create root owned directories.

BUG= chromium:658504 
TEST=- (new) unittest
     - Release trybot with CL:401998 and (reland of) CL:398480

Change-Id: I11f33e86a48031772d943ee9473dfc434d08c41f
Reviewed-on: https://chromium-review.googlesource.com/403368
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit b26e36ac20a149994bd9a15e57bdfce0c1a62d72)
Reviewed-on: https://chromium-review.googlesource.com/404152
Tested-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: YH Lin <yueherngl@chromium.org>

[modify] https://crrev.com/80c3be82b19c64f5e639b7f67c823af889903be3/lib/osutils_unittest.py
[modify] https://crrev.com/80c3be82b19c64f5e639b7f67c823af889903be3/lib/osutils.py
[modify] https://crrev.com/80c3be82b19c64f5e639b7f67c823af889903be3/lib/cros_test_lib.py

Project Member

Comment 23 by bugdroid1@chromium.org, Oct 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/04e1a061eeeb27a1ca8be0ee6a9b805985c8a730

commit 04e1a061eeeb27a1ca8be0ee6a9b805985c8a730
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Sat Oct 22 08:41:44 2016

cros_sdk: Don't make directories as root.

cros_sdk made some cache directories as root which created problems for
non root users working inside it. FixIt.

BUG= chromium:658504 
TEST=unittests, pre-cq

Change-Id: I5c478b93de1982d682c6b93a1e76f7ebf5a8fef1
Reviewed-on: https://chromium-review.googlesource.com/401998
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
(cherry picked from commit 06a5056635561d2e322c1ed752c79b4548085999)
Reviewed-on: https://chromium-review.googlesource.com/404153
Tested-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: YH Lin <yueherngl@chromium.org>

[modify] https://crrev.com/04e1a061eeeb27a1ca8be0ee6a9b805985c8a730/scripts/cros_sdk.py

Project Member

Comment 24 by bugdroid1@chromium.org, Oct 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/8958ca91e235f3558b3d8e81ba9bd95c1f561f3f

commit 8958ca91e235f3558b3d8e81ba9bd95c1f561f3f
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Sat Oct 22 08:41:44 2016

cros_sdk: Don't make directories as root.

cros_sdk made some cache directories as root which created problems for
non root users working inside it. FixIt.

BUG= chromium:658504 
TEST=unittests, pre-cq

Change-Id: I5c478b93de1982d682c6b93a1e76f7ebf5a8fef1
Reviewed-on: https://chromium-review.googlesource.com/401998
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
(cherry picked from commit 06a5056635561d2e322c1ed752c79b4548085999)
Reviewed-on: https://chromium-review.googlesource.com/404880
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>

[modify] https://crrev.com/8958ca91e235f3558b3d8e81ba9bd95c1f561f3f/scripts/cros_sdk.py

Project Member

Comment 25 by bugdroid1@chromium.org, Oct 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/4934360a9b0f51c993396f2511afcbe45005e4e5

commit 4934360a9b0f51c993396f2511afcbe45005e4e5
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Tue Oct 25 20:09:02 2016

lib: Create non-root directory even in a parent path owned by root.

SafeMakedirsNonRoot can now create non-root directories even if the
parent path is owned by root. This extends the steps we take to recover
from mistakes that lead us to create root owned directories.

BUG= chromium:658504 
TEST=- (new) unittest
     - Release trybot with CL:401998 and (reland of) CL:398480

Change-Id: I11f33e86a48031772d943ee9473dfc434d08c41f
Reviewed-on: https://chromium-review.googlesource.com/403368
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit b26e36ac20a149994bd9a15e57bdfce0c1a62d72)
Reviewed-on: https://chromium-review.googlesource.com/404881
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>

[modify] https://crrev.com/4934360a9b0f51c993396f2511afcbe45005e4e5/lib/osutils_unittest.py
[modify] https://crrev.com/4934360a9b0f51c993396f2511afcbe45005e4e5/lib/osutils.py
[modify] https://crrev.com/4934360a9b0f51c993396f2511afcbe45005e4e5/lib/cros_test_lib.py

Status: Fixed (was: Started)
Project Member

Comment 27 by bugdroid1@chromium.org, Nov 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/36ef858fa638b22f182c46c3d5bd222f400ce15e

commit 36ef858fa638b22f182c46c3d5bd222f400ce15e
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Sat Oct 22 08:41:44 2016

cros_sdk: Don't make directories as root.

cros_sdk made some cache directories as root which created problems for
non root users working inside it. FixIt.

BUG= chromium:658504 
TEST=unittests, pre-cq

Change-Id: I5c478b93de1982d682c6b93a1e76f7ebf5a8fef1
Reviewed-on: https://chromium-review.googlesource.com/401998
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
(cherry picked from commit 06a5056635561d2e322c1ed752c79b4548085999)
Reviewed-on: https://chromium-review.googlesource.com/407660
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>

[modify] https://crrev.com/36ef858fa638b22f182c46c3d5bd222f400ce15e/scripts/cros_sdk.py

Project Member

Comment 28 by bugdroid1@chromium.org, Nov 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/1891c6785d311ca34f72d898bb018b6b84075910

commit 1891c6785d311ca34f72d898bb018b6b84075910
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Tue Oct 25 20:09:02 2016

lib: Create non-root directory even in a parent path owned by root.

SafeMakedirsNonRoot can now create non-root directories even if the
parent path is owned by root. This extends the steps we take to recover
from mistakes that lead us to create root owned directories.

BUG= chromium:658504 
TEST=- (new) unittest
     - Release trybot with CL:401998 and (reland of) CL:398480

Change-Id: I11f33e86a48031772d943ee9473dfc434d08c41f
Reviewed-on: https://chromium-review.googlesource.com/403368
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit b26e36ac20a149994bd9a15e57bdfce0c1a62d72)
Reviewed-on: https://chromium-review.googlesource.com/407659
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>

[modify] https://crrev.com/1891c6785d311ca34f72d898bb018b6b84075910/lib/osutils_unittest.py
[modify] https://crrev.com/1891c6785d311ca34f72d898bb018b6b84075910/lib/osutils.py
[modify] https://crrev.com/1891c6785d311ca34f72d898bb018b6b84075910/lib/cros_test_lib.py

Status: Started (was: Fixed)
Still not fixed: https://luci-logdog.appspot.com/v/?s=chromeos%2Fbb%2Fchromeos.branch%2Fpbody_factory_factory-glados-7828.B%2F39%2F%2B%2Frecipes%2Fsteps%2FSyncChrome%2F0%2Fstdout

Another fallback path in sync_chrome needs to be hardened. CL incoming.
Project Member

Comment 30 by bugdroid1@chromium.org, Nov 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/e149b95746b8578db93503bbd38dd71408147d52

commit e149b95746b8578db93503bbd38dd71408147d52
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Fri Nov 11 18:41:20 2016

sync_chrome: Make directories as non-root user.

After osutils.SafeMakedirsNonRoot is hardened to try to create non-root
directories under various root owned paths (e.g.: by CL:404152).
sync_chrome might decide to clobber the chrome checkout if it is
inaccessible because a prefix of the path is owned by root. In that
case, *NonRoot variant to successfully fix the path ownership.

BUG= chromium:658504 
TEST=pre-cq, factory branches can finally build...

Change-Id: I11018fed2bec6c5f17ec432c90ef81119cdcf022
Reviewed-on: https://chromium-review.googlesource.com/410285
Commit-Ready: YH Lin <yueherngl@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>

[modify] https://crrev.com/e149b95746b8578db93503bbd38dd71408147d52/scripts/sync_chrome.py

Project Member

Comment 31 by bugdroid1@chromium.org, Nov 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/14aed3572828c43ce81974ecc8bc8bc99c0f6ffe

commit 14aed3572828c43ce81974ecc8bc8bc99c0f6ffe
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Fri Nov 11 18:41:20 2016

sync_chrome: Make directories as non-root user.

After osutils.SafeMakedirsNonRoot is hardened to try to create non-root
directories under various root owned paths (e.g.: by CL:404152).
sync_chrome might decide to clobber the chrome checkout if it is
inaccessible because a prefix of the path is owned by root. In that
case, *NonRoot variant to successfully fix the path ownership.

BUG= chromium:658504 
TEST=pre-cq, factory branches can finally build...

Change-Id: I11018fed2bec6c5f17ec432c90ef81119cdcf022
Reviewed-on: https://chromium-review.googlesource.com/410285
Commit-Ready: YH Lin <yueherngl@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
(cherry picked from commit e149b95746b8578db93503bbd38dd71408147d52)
Reviewed-on: https://chromium-review.googlesource.com/410286
Commit-Queue: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>

[modify] https://crrev.com/14aed3572828c43ce81974ecc8bc8bc99c0f6ffe/scripts/sync_chrome.py

Project Member

Comment 32 by bugdroid1@chromium.org, Nov 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/db021617d9c6565220dd43d4e5cda6c09fd23ebf

commit db021617d9c6565220dd43d4e5cda6c09fd23ebf
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Fri Nov 11 18:41:20 2016

sync_chrome: Make directories as non-root user.

After osutils.SafeMakedirsNonRoot is hardened to try to create non-root
directories under various root owned paths (e.g.: by CL:404152).
sync_chrome might decide to clobber the chrome checkout if it is
inaccessible because a prefix of the path is owned by root. In that
case, *NonRoot variant to successfully fix the path ownership.

BUG= chromium:658504 
TEST=pre-cq, factory branches can finally build...

Change-Id: I11018fed2bec6c5f17ec432c90ef81119cdcf022
Reviewed-on: https://chromium-review.googlesource.com/410285
Commit-Ready: YH Lin <yueherngl@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
(cherry picked from commit e149b95746b8578db93503bbd38dd71408147d52)
Reviewed-on: https://chromium-review.googlesource.com/410880
Commit-Queue: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>

[modify] https://crrev.com/db021617d9c6565220dd43d4e5cda6c09fd23ebf/scripts/sync_chrome.py

Owner: yueherngl@chromium.org
Handing over to yueherngl@ for merges he's been driving.
Project Member

Comment 34 by bugdroid1@chromium.org, Dec 14 2016

Labels: merge-merged-factory-auron-6772.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/91a33609bdc5fae0d030db96db3a263f171688e8

commit 91a33609bdc5fae0d030db96db3a263f171688e8
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Sat Oct 22 08:41:44 2016

cros_sdk: Don't make directories as root.

cros_sdk made some cache directories as root which created problems for
non root users working inside it. FixIt.

BUG= chromium:658504 
TEST=unittests, pre-cq

Change-Id: I5c478b93de1982d682c6b93a1e76f7ebf5a8fef1
Reviewed-on: https://chromium-review.googlesource.com/401998
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
(cherry picked from commit 06a5056635561d2e322c1ed752c79b4548085999)
Reviewed-on: https://chromium-review.googlesource.com/407660
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>
(cherry picked from commit 36ef858fa638b22f182c46c3d5bd222f400ce15e)
Reviewed-on: https://chromium-review.googlesource.com/411442

[modify] https://crrev.com/91a33609bdc5fae0d030db96db3a263f171688e8/scripts/cros_sdk.py

Project Member

Comment 35 by bugdroid1@chromium.org, Dec 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/c013312092c2cdfefd400788804b25032f48fc11

commit c013312092c2cdfefd400788804b25032f48fc11
Author: Prathmesh Prabhu <pprabhu@chromium.org>
Date: Fri Nov 11 18:41:20 2016

sync_chrome: Make directories as non-root user.

After osutils.SafeMakedirsNonRoot is hardened to try to create non-root
directories under various root owned paths (e.g.: by CL:404152).
sync_chrome might decide to clobber the chrome checkout if it is
inaccessible because a prefix of the path is owned by root. In that
case, *NonRoot variant to successfully fix the path ownership.

BUG= chromium:658504 
TEST=pre-cq, factory branches can finally build...

Change-Id: I11018fed2bec6c5f17ec432c90ef81119cdcf022
Reviewed-on: https://chromium-review.googlesource.com/410285
Commit-Ready: YH Lin <yueherngl@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
(cherry picked from commit e149b95746b8578db93503bbd38dd71408147d52)
Reviewed-on: https://chromium-review.googlesource.com/410880
Commit-Queue: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>
(cherry picked from commit db021617d9c6565220dd43d4e5cda6c09fd23ebf)
Reviewed-on: https://chromium-review.googlesource.com/411444

[modify] https://crrev.com/c013312092c2cdfefd400788804b25032f48fc11/scripts/sync_chrome.py

Status: Fixed (was: Started)
Looks like we are good at this point so I am marking the bug fixed.
Please re-open if in need.
Thanks.

Comment 37 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 39 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)
Status: Fixed (was: Archived)
Project Member

Comment 41 by bugdroid1@chromium.org, Jul 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/00952228b60d8245bc77607b168d11134390bbf7

commit 00952228b60d8245bc77607b168d11134390bbf7
Author: Mike Frysinger <vapier@chromium.org>
Date: Sat Jul 21 08:40:57 2018

sync_chrome: actually run the sync function

The previous change in here stopped returning the functor from
SyncChrome, but didn't execute it.  This caused the sync logic
to not actually sync anything.

BUG= chromium:658504 ,  chromium:864873 
TEST=None

Change-Id: I2616657d745d9666237fa2956361940458b5499c
Reviewed-on: https://chromium-review.googlesource.com/1146049
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/00952228b60d8245bc77607b168d11134390bbf7/scripts/sync_chrome.py

Sign in to add a comment