-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[bitnami/elasticsearch] do not fail if asked to chown read-only files #77526
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
base: main
Are you sure you want to change the base?
Conversation
7f88251
to
35f8413
Compare
This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. |
Still relevant. |
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.
Thank you very much for your contribution @ianroberts. I'm sorry for the late response.
I would like to suggest two changes to your contribution:
- You used
|| :
, but we prefer using|| true
. - You added both
|| :
and-f
option for chown, which is redundant. The option-f
suppresses both error exit-code and messages, while the|| :
would supress the exit code. I would suggest not using-f
, since hiding error message could make troubleshooting really complicated in some cases.
bitnami/elasticsearch/8/debian-12/rootfs/opt/bitnami/scripts/libelasticsearch.sh
Outdated
Show resolved
Hide resolved
bitnami/elasticsearch/8/debian-12/rootfs/opt/bitnami/scripts/libelasticsearch.sh
Outdated
Show resolved
Hide resolved
35f8413
to
2a9bd60
Compare
Very sensible suggestions, I've implemented them and rebased on the latest main branch. |
My first attempt just used the |
Still waiting for final review. |
This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. |
Not stale, still waiting for final approval by @migruiz4 |
This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. |
Not stale. I addressed the review comments six weeks ago on 11th March but my fixes are still awaiting final approval. Please could someone look at this soon as I have another PR on the helm chart that is blocked waiting for this one. |
This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. |
Eight weeks. @carrodher if @migruiz4 is no longer available to handle this, would you be able to assign someone else? |
Sorry for the delay, this PR was somehow out of our radar. Could you please move the changes to the |
Added "|| true" to chown commands so they do not cause the container startup to fail if any of the target folders or their subdirectories are mounted from a read-only filesystem Signed-off-by: Ian Roberts <[email protected]>
2a9bd60
to
e68a791
Compare
Rebased, but the delay is slightly unfortunate if it means there will never be a fixed container released for any Elasticsearch in the 8.x series 😞 |
Description of the change
Add
|| true
tochown
commands that operate recursively on folders that are expected to be mounted into the container from volumes or bind mounts, so that thechown
does not cause a fatal error if any of the target directories or their children are mounted read-only.Benefits
Currently when running as root the elasticsearch container will fail to start if any folder under
/opt/bitnami/elasticsearch/config
is mounted from a read-only filesystem. In particular this happens in the corresponding bitnami Helm chart, where the TLS certificates for Elasticsearch are mounted in from a Kubernetes secret. This change means that such cases are no longer fatal errors - the files in the read-only filesystems will not of course have their ownership changed, but there's not really anything better we can do if the filesystem is read-only.Possible drawbacks
If a mounted filesystem should have been read-write but was mounted read-only by mistake, it would previously have caused a fatal error, prompting the user to change their configuration; this change will make that a no-op so they might not notice.
Applicable issues
Additional information
This fix should probably be applied before bitnami/charts#31960 is merged.