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

Verify that absolute path is used in journal/ledgerDirectories options #140

Closed
SrishT opened this issue May 11, 2021 · 0 comments · Fixed by #141
Closed

Verify that absolute path is used in journal/ledgerDirectories options #140

SrishT opened this issue May 11, 2021 · 0 comments · Fixed by #141
Assignees

Comments

@SrishT
Copy link
Contributor

SrishT commented May 11, 2021

Description

If the user forgets to include the leading forward slash ("/") in the journalDirectories option on the bookkeeperCluster resource, then the persistent volume subpath is mounted to "/bk/journal/j0" on the bookie pod, but the journal files are written to "/opt/bookkeeper/bk/journal/j0" (path calculated relative to the bookie home folder).
As a result, the journal data is not saved to the persistent volume, so there is a danger of the local disk getting out of space and/or data being lost if the pod gets deleted.
Same problem exists with ledgerDirectories setting.

Importance

must have

Location

pkg/apis/bookkeeper/v1alpha1/bookkeepercluster_types.go

Suggestions for an improvement

Make use of the admission webhook to verify that both journalDirectories and ledgerDirectories options are using absolute paths to set the folder structure.

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.

1 participant