-
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
chown dirs when migrating ephemeral_disk data #3723
Conversation
e26011f
to
50236f7
Compare
CHANGELOG.md
Outdated
@@ -4,6 +4,7 @@ BUG FIXES: | |||
* core: Fix search endpoint forwarding for multi-region clusters [[GH-3680](https://github.com/hashicorp/nomad/issues/3680)] | |||
* core: Fix an issue in which batch jobs with queued placements and lost | |||
allocations could result in improper placement counts [[GH-3717](https://github.com/hashicorp/nomad/issues/3717)] | |||
* client: chown directories for migrated `ephemeral_disk`s [GH-3723] |
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.
Migrated ephemeral_disk's maintain directory permissions
?
@@ -499,7 +499,15 @@ func (p *remotePrevAlloc) streamAllocDir(ctx context.Context, resp io.ReadCloser | |||
|
|||
// If the header is for a directory we create the directory | |||
if hdr.Typeflag == tar.TypeDir { | |||
os.MkdirAll(filepath.Join(dest, hdr.Name), os.FileMode(hdr.Mode)) | |||
name := filepath.Join(dest, hdr.Name) |
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.
Any way to add a test?
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.
Yup! Added! Thanks for catching that.
Fixes #3702 Added missing chown call and made it conditional on running as root and not on Windows as we do with files.
50236f7
to
a010d4b
Compare
We have tested the patch successfully ! |
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. |
Fixes #3702
Added missing chown call and made it conditional on running as root and
not on Windows as we do with files.
50236f7 builds:
linux_amd64.zip
linux_386.zip