-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Hey!
We see that some of our workspaces with large home-dirs uses quite a bit of time on the owner-transfer-step:
#3: 🔄 Updating ownership of /home/coder...
#3: 🏡 Updated ownership of /home/coder! [2m1.175064722s]
This might be a somewhat extreme case, where the home-dir has a couple of pipx-installs, and pyenv-venvs. Where the home-dir has been prebuild, and comes with the image.
In our case this is already owned by the coder-user, and the ownership does not seem to be shifted to root on envbuild, so in this case, the ownership-transfer seems to be redundant.
So tested with removing the ownership-transfer (
Lines 829 to 842 in 7eabaa4
| if execArgs.UserInfo.uid != 0 { | |
| endStage := startStage("🔄 Updating ownership of %s...", execArgs.UserInfo.user.HomeDir) | |
| if chownErr := filepath.Walk(execArgs.UserInfo.user.HomeDir, func(path string, _ fs.FileInfo, err error) error { | |
| if err != nil { | |
| return err | |
| } | |
| return os.Lchown(path, execArgs.UserInfo.uid, execArgs.UserInfo.gid) | |
| }); chownErr != nil { | |
| opts.Logger(log.LevelError, "chown %q: %s", execArgs.UserInfo.user.HomeDir, chownErr.Error()) | |
| endStage("⚠️ Failed to update ownership of %s, you may need to fix this manually!", execArgs.UserInfo.user.HomeDir) | |
| } else { | |
| endStage("🏡 Updated ownership of %s!", execArgs.UserInfo.user.HomeDir) | |
| } | |
| } |
gabrielalmeida
Metadata
Metadata
Assignees
Labels
No labels