-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Ensure dev/, proc/, and alloc/ are mounted every time a task is run #2394
Conversation
If they're unmounted by a reboot they'll be properly remounted.
client/allocdir/fs_linux.go
Outdated
@@ -30,8 +30,15 @@ func linkDir(src, dst string) error { | |||
|
|||
// unlinkDir unmounts a bind mounted directory as Linux doesn't support | |||
// hardlinking directories. | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit pick but can you just add that to the existing comment. No need for extra line
client/allocdir/task_dir.go
Outdated
// Build default directories and permissions in a task directory. If the built | ||
// boolean is true Build assumes the task dir has already been built and skips | ||
// expensive operations like chroot creation. | ||
func (t *TaskDir) Build(built bool, chroot map[string]string, fsi cstructs.FSIsolation) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like built
since you wouldn't call Build if that is true. Can it be chrootCreated
client/allocdir/task_dir.go
Outdated
// Link/copy chroot entries | ||
if err := t.embedDirs(entries); err != nil { | ||
return err | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments here
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Since mounts disappear on reboot, ensure everything is properly mounted every time a task starts.
This behavior was changed in #2132. Prior to that PR we rebuilt the entire task dir every time a task started.