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

Per-user packages #99

Closed
achimnol opened this issue Jan 10, 2020 · 5 comments
Closed

Per-user packages #99

achimnol opened this issue Jan 10, 2020 · 5 comments
Labels
area:ux UI / UX issue. comp:agent Related to Agent component comp:client Related to Client component comp:manager Related to Manager component type:feature Add new features
Milestone

Comments

@achimnol
Copy link
Member

achimnol commented Jan 10, 2020

There are many customer requests to preserve the home directory contents, mainly user-installed packages.

The problem is, since our home directories are bind-mounted from each agent's scratch directory, they are not present in Docker images even we perform docker commit against running sessions. The technical reasons to use scratch directories are: 1) better I/O performance, 2) agent customization of home directory before starting containers, and 3) enforcement of quota limits.

Another problem is that some customer sites do not allow use of per-user vfolders due to their organizational policy, though we are offering auto-mounts of dot-prefixed per-user vfolders (e.g., .local and .ssh) if present to all sessions (#57) as an alternative to the above problem.

This issue tackles the first problem: per-user packages.

It is difficult not to use the scratch directories because #98 and many other Backend.AI features (lablup/backend.ai-manager#211, #77, ...) rely on pre-population of the scratch (=home) directory before container starting.

Automatically mapping .local vfolder for each user and each kernel image may be a technically viable solution as @inureyes proposed, but this can be quickly bloated when users import custom images frequently and images are updated frequently, and also it violates the limitation imposed by the second problem since there is no way to restrict filesystem access by the purpose (e.g., installation of packages).

Let's discuss ideas for making user-install packages persistent across different sessions.

┆Issue is synchronized with this Asana task by Unito

@achimnol achimnol added the type:feature Add new features label Jan 10, 2020
@achimnol achimnol added this to the 19.12 milestone Jan 10, 2020
@achimnol achimnol changed the title New vfolder type: settings Per-user packages Jan 10, 2020
@achimnol achimnol modified the milestones: 19.12, Bank Jan 10, 2020
@achimnol
Copy link
Member Author

achimnol commented Jan 10, 2020

@inureyes' 2nd idea:

  • Let's extend auto-mounting of dot-prefixed vfolders to group vfolders. For instance, when each group has a vfolder named .local and a user spawns a new container in this group, create a user-specific directory under the group .local vfolder and mount that directory (instead of the vfolder's root) into /home/work/.local of the container.
    • This way, administrators can inspect and control the usage of this vfolder just like other group vfolder.
    • We can satisfy the restriction policy for personal vfolders still.
    • If there are both group and user vfolders in the same name, the user vfolder has precedence. (Note that this feature will be mainly used by customer sites with the user vfolder restriction policy)

@achimnol achimnol mentioned this issue Jan 10, 2020
5 tasks
@achimnol
Copy link
Member Author

After resolving the vfolder issue, we need the followings in the docs/manuals:

  • How to install per-user deb/rpm packages
  • How to use linuxbrew
  • How to use conda as a user-specific package manager

@achimnol achimnol added area:ux UI / UX issue. comp:manager Related to Manager component comp:agent Related to Agent component comp:client Related to Client component labels Jan 15, 2020
@achimnol
Copy link
Member Author

achimnol commented Jan 20, 2020

For now, let's just auto-mount an auto-created sub-directory for the user ID in the group-level dot-prefixed vfolders when there is no corresponding user-level dot-prefixed vfolders.

e.g., When there is a group vfolder .local whose real path is /mnt/vfroot/vhost/abcdef, create a subdirectory /mnt/vfroot/vhost/abcdef/username and mount it as /home/work/.local.

@achimnol
Copy link
Member Author

Tracked by OP#106

@achimnol achimnol modified the milestones: 19.12, 20.03 Jul 28, 2020
@achimnol
Copy link
Member Author

Resolved with lablup/backend.ai-manager#224.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:ux UI / UX issue. comp:agent Related to Agent component comp:client Related to Client component comp:manager Related to Manager component type:feature Add new features
Projects
None yet
Development

No branches or pull requests

2 participants