OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Local group creation for enduser assignment - fix #1226 #1624 #1591

Open imkebe opened this issue 9 months ago • 8 comments

Lack of group caused usermod command to fail, hence no permissions resulting from group membership - docker socket access.

imkebe avatar May 08 '24 20:05 imkebe

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (main@446eaec). Click here to learn what that means.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1658   +/-   ##
=======================================
  Coverage        ?   63.05%           
=======================================
  Files           ?       94           
  Lines           ?     3908           
  Branches        ?        0           
=======================================
  Hits            ?     2464           
  Misses          ?     1444           
  Partials        ?        0           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 08 '24 21:05 codecov-commenter

LGTM.

But a suggestion, you can add linked issues to PR comment, like following in #1463.

image

Umpire2018 avatar May 09 '24 00:05 Umpire2018

@Umpire2018 Sure. However I would expect someone to test it for different enviroments and then decide if can be closed. Ref #1226 #1624 #1591 #1657

imkebe avatar May 09 '24 07:05 imkebe

See also: https://github.com/OpenDevin/OpenDevin/pull/1651

rbren avatar May 09 '24 23:05 rbren

@imkebe can you try running with tag 1651-merge? I just incorporated some of your changes here into that PR

rbren avatar May 10 '24 01:05 rbren

@rbren group issue is solved. There is now another source ~/.bash.rc issue but it's out of scope of this PR. The 0 group id means that it's root. It seems not to be the way docker should be handled However at the end we are creating the group inside container and root group will be there and will have all permissions so it shouldn't be a huge problem.

imkebe avatar May 10 '24 08:05 imkebe

I think we need to be a little more careful here.

This is what I get when running:

Creating docker group with fetched gid.
groupadd: GID '0' already exists
Adding enduser to local docker group
usermod: group 'docker' does not exist

doesn't seem to break it, but we should think through this one before merging

@rben As these statements are used to run docker as non-root, running as root won't break it. https://docs.docker.com/engine/install/linux-postinstall/

SmartManoj avatar May 10 '24 10:05 SmartManoj

@imkebe can you try running with tag 1651-merge? I just incorporated some of your changes here into that PR

this fixed the docker issue for me (see #1685) but litellm pricing problem persist (#1667)

wmsmigiel avatar May 10 '24 11:05 wmsmigiel

Hey all--I think all these issues (including the bashrc timeout) have been solved at this point

Thanks @imkebe for the inspiration here--it was a big help in tracking down one of the major issues!

rbren avatar May 11 '24 15:05 rbren