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

Add initContainer for initializing persistentHome when $HOME persistence enabled #1260

Closed
AObuchow opened this issue May 14, 2024 · 0 comments · Fixed by #1251
Closed

Add initContainer for initializing persistentHome when $HOME persistence enabled #1260

AObuchow opened this issue May 14, 2024 · 0 comments · Fixed by #1251
Assignees
Milestone

Comments

@AObuchow
Copy link
Collaborator

Description

Currently, $HOME persistence functionality relies on the Universal Developer Image's entrypoint to create symbolic links (and copy some non-linkable files) from the containers tooling directory (/home/tooling/) to the persistent $HOME directory (/home/user/).

The problem with this approach is that there is no guarantee that the containers entrypoint will be run before any devfile postStart commands. This results in a potential race condition between the initialization of the persistent $HOME directory, and any postStart commands that may depend on the $HOME directory being initialized.

In order to resolve this race condition, @dkwon17 has proposed to move the $HOME persistence initialization logic outside of the UDI's entrypoint, into a devfile container that will be applied as a preStart command (i.e. an initContainer). The initContainer will guarantee that the $HOME persistence initialization logic always runs before any devfile postStart commands.

Additional context

Related upstream issue: eclipse-che/che#22914

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

Successfully merging a pull request may close this issue.

2 participants