Skip to content

KAFKA-12190: Fix setting of file permissions on non-POSIX filesystems#9968

Merged
ableegoldman merged 1 commit intoapache:2.6from
wilkinsona:KAFKA-12190-2.6
Jan 26, 2021
Merged

KAFKA-12190: Fix setting of file permissions on non-POSIX filesystems#9968
ableegoldman merged 1 commit intoapache:2.6from
wilkinsona:KAFKA-12190-2.6

Conversation

@wilkinsona
Copy link
Copy Markdown
Contributor

This pull request back-ports to 2.6 the changes I contributed in #9947.

Previously, StateDirectory used PosixFilePermissions to configure its directories' permissions which fails on Windows as its file system is not POSIX-compliant. This PR updates StateDirectory to fall back to the File API on non-POSIX-compliant file systems. The File API doesn't allow as much control over the permissions so they're as close as the API permits.

The unit tests have been updated to also verify the behaviour on non-POSIX-compliant file systems.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

Previously, StateDirectory used PosixFilePermissions to configure its
directories' permissions which fails on Windows as its file system is
not POSIX-compliant. This commit updates StateDirectory to fall back to
the File API on non-POSIX-compliant file systems.
Copy link
Copy Markdown
Member

@ableegoldman ableegoldman left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for porting this to the 2.6 branch. LGTM. Will merge once the build completes

@ableegoldman
Copy link
Copy Markdown
Member

Huh, the Java 8 & 14 builds both passed but the Java 11 build has been still in progress for a while now. Seems to be environmental -- in fact if I look at the output it actually seems all tests have passed, and it's just hanging somewhere in the shutdown 🤔

Will test out this patch locally to be safe before merging

@ableegoldman ableegoldman merged commit fab75b7 into apache:2.6 Jan 26, 2021
@ableegoldman
Copy link
Copy Markdown
Member

Merged to 2.6

@wilkinsona
Copy link
Copy Markdown
Contributor Author

Thanks again.

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 this pull request may close these issues.

2 participants