-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Ignore chown errors #47
Conversation
If any files are mounted from k8s secrets the chown commands will fail due to the fact that these files will only be read-only. This commit ignores any errors during the chown commands.
Hi @cdalvaro Thanks for reviewing this. I'll check your suggestions against my setup and see what happens. |
Hi @Kidswiss, thank you very much for your changes! Does they work right for your setup? If the image is working properly for you with these changes I'll merge this PR asap. |
It's running into a chown issue somewhere again:
|
Co-authored-by: Carlos D. Álvaro <[email protected]>
b8b4987
to
ac29208
Compare
So the issue must be here now: # Salt configuration directory
if [[ -w "${SALT_CONFS_DIR}" ]]; then
chown -R "${SALT_USER}": "${SALT_CONFS_DIR}"
else
echo "${SALT_CONFS_DIR} is mounted as a read-only volume. Ownership won't be changed."
fi I don't know why Anyway, making this change should fix your issue: - chown -R "${SALT_USER}": "${SALT_CONFS_DIR}"
+ chown -R "${SALT_USER}": "${SALT_CONFS_DIR}" || log_error "Unable to change '${SALT_CONFS_DIR}' ownership" We can add this change to |
It starts through now:
Thanks! |
I assume this snipped doesn't work as it checks the if the folder is read-only and not the files within: My case is that single files within the folder are mounted as read-only k8s secrets. |
Co-authored-by: Carlos D. Álvaro <[email protected]>
Co-authored-by: Carlos D. Álvaro <[email protected]>
@Kidswiss - Thank you very much for your contribution! |
Thank you very much for providing this image! I just recently found that the official salt images have been archived... |
I'm very glad that this image is useful for you! I really appreciate new feature or improvements suggestions for this image! |
If any files are mounted from k8s secrets the chown commands will fail
due to the fact that these files will only be read-only.
This commit ignores any errors during the chown commands.