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

Ensure dev/, proc/, and alloc/ are mounted every time a task is run #2394

Merged
merged 10 commits into from
Mar 3, 2017

Conversation

schmichael
Copy link
Member

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.

@@ -30,8 +30,15 @@ func linkDir(src, dst string) error {

// unlinkDir unmounts a bind mounted directory as Linux doesn't support
// hardlinking directories.
//
Copy link
Contributor

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

// 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 {
Copy link
Contributor

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

// Link/copy chroot entries
if err := t.embedDirs(entries); err != nil {
return err
//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments here

@schmichael schmichael merged commit ee0ad0a into master Mar 3, 2017
@schmichael schmichael deleted the b-remount branch March 3, 2017 17:46
schmichael added a commit that referenced this pull request Mar 3, 2017
@github-actions
Copy link

github-actions bot commented Apr 4, 2023

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants