Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use UID not username to set HOME dir #10010

Merged
merged 1 commit into from
Oct 2, 2024
Merged

fix: use UID not username to set HOME dir #10010

merged 1 commit into from
Oct 2, 2024

Conversation

rb-determined-ai
Copy link
Member

When a task's uid setting is nonzero but username is still "root", we will accidentally set the HOME directory to /root.

This happens because we start the container based on the UID, then we look up the username (uid->username lookup) and we find that we are called "root", then we do a username->HOME lookup to arrive at /root.

When a task's uid setting is nonzero but username is still "root", we
will accidentally set the HOME directory to /root.

This happens because we start the container based on the UID, then we
look up the username (uid->username lookup) and we find that we are
called "root", then we do a username->HOME lookup to arrive at /root.
@rb-determined-ai rb-determined-ai requested a review from a team as a code owner October 2, 2024 16:12
@cla-bot cla-bot bot added the cla-signed label Oct 2, 2024
Copy link

netlify bot commented Oct 2, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit 676b811
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66fd710ca73479000873aba2

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.57%. Comparing base (63d728c) to head (676b811).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10010   +/-   ##
=======================================
  Coverage   54.56%   54.57%           
=======================================
  Files        1259     1259           
  Lines      157233   157233           
  Branches     3619     3619           
=======================================
+ Hits        85802    85806    +4     
+ Misses      71298    71294    -4     
  Partials      133      133           
Flag Coverage Δ
backend 45.33% <ø> (+<0.01%) ⬆️
harness 72.68% <ø> (ø)
web 54.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 7 files with indirect coverage changes

@rb-determined-ai rb-determined-ai merged commit 1297899 into main Oct 2, 2024
84 of 98 checks passed
@rb-determined-ai rb-determined-ai deleted the rb/uid branch October 2, 2024 16:47
@rb-determined-ai
Copy link
Member Author

oops, I meant to enable auto-merge but it looks like I accidentally force-merged.

Should be ok, the only remaining failure was a flaky e2e web test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants