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

[bitnami/grafana] Ensure bitnami/grafana folder is created with usable permissions #52255

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

bpfoster
Copy link
Contributor

@bpfoster bpfoster commented Oct 31, 2023

Description of the change

Ensures that /bitnami/grafana folder is created with usable permissions. I believe this follows the examples of other bitnami images.

Without this folder being created, adding user init scripts leads to an error on startup:
mkdir: cannot create directory '/bitnami': Permission denied

Benefits

Necessary folders are created with proper permissions so that the image can run as the non-root user.

Possible drawbacks

None

Applicable issues

Additional information

@github-actions github-actions bot added the triage Triage is needed label Oct 31, 2023
@carrodher carrodher added the verify Execute verification workflow for these changes label Nov 2, 2023
@github-actions github-actions bot added in-progress and removed triage Triage is needed labels Nov 2, 2023
@bitnami-bot bitnami-bot removed the request for review from javsalgar November 2, 2023 08:32
Copy link

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.

@github-actions github-actions bot added the stale 15 days without activity label Nov 18, 2023
@bpfoster
Copy link
Contributor Author

Un-stale

@github-actions github-actions bot removed the stale 15 days without activity label Nov 20, 2023
@CeliaGMqrz
Copy link
Contributor

Hi @bpfoster,

Sorry for my late response. Thanks for your contribution!

Maybe we could maintain consistency by using grafana_env_var_value as well?

@bpfoster
Copy link
Contributor Author

bpfoster commented Nov 20, 2023

Hi @CeliaGMqrz no problem for the delay!

If we use the grafana_env_var_value function, it would require the variable being prefixed with GF_ (or GRAFANA_CFG_).
This would move it from the "Grafana paths" to the "Grafana configurations" section in the env file.

Happy to make that change if you'd prefer it that way, just want to confirm the change to the env variable as well as I'm not familiar with the reasoning for separate naming conventions.

Copy link

github-actions bot commented Dec 6, 2023

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.

@github-actions github-actions bot added the stale 15 days without activity label Dec 6, 2023
@bpfoster
Copy link
Contributor Author

bpfoster commented Dec 6, 2023

Un-stale

@github-actions github-actions bot removed the stale 15 days without activity label Dec 7, 2023
@CeliaGMqrz
Copy link
Contributor

Hi @bpfoster,

Thanks for your patience and taking care of this issue.

In effect, this change would require to set the GF_ prefix and move it to the Grafana configuration section in the env file.

@bpfoster
Copy link
Contributor Author

@CeliaGMqrz sounds good. Variable is now named GF_VOLUME_DIR and is reference by the grafana_env_var_value function per your recommendation.

Copy link

github-actions bot commented Jan 4, 2024

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.

@github-actions github-actions bot added the stale 15 days without activity label Jan 4, 2024
@bpfoster
Copy link
Contributor Author

bpfoster commented Jan 4, 2024

Un-stale

@github-actions github-actions bot removed the stale 15 days without activity label Jan 5, 2024
@CeliaGMqrz
Copy link
Contributor

Hi @bpfoster, thanks for your feedback.

Sorry for the delay after the vacation.

The changes have not been applied correctly. Could you fix the DCO issue?

This follows the examples of other images.
Without this folder being created, mounting user init scripts leads
to an error on startup:
"mkdir: cannot create directory '/bitnami': Permission denied"

fixes bitnami#52238

Signed-off-by: Ben Foster <bpfoster@gmail.com>
…rence it, per PR feedback

Signed-off-by: Ben Foster <bpfoster@gmail.com>
@bpfoster
Copy link
Contributor Author

bpfoster commented Jan 8, 2024

@CeliaGMqrz my apologies for missing the commit signing. Amended the commit and DCO check is now passing.

Copy link

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.

@github-actions github-actions bot added the stale 15 days without activity label Jan 24, 2024
@bpfoster
Copy link
Contributor Author

Un-stale

@github-actions github-actions bot removed the stale 15 days without activity label Jan 25, 2024
Copy link
Contributor

@CeliaGMqrz CeliaGMqrz left a comment

Choose a reason for hiding this comment

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

Hi, @bpfoster

Sorry to keep you waiting with this PR.

I have consulted with the team and we are going to merge these changes for a temporary workaround. I will create an internal task to review the persistence logic of this container in accordance with grafana configuration to adapt this feature in a cleaner way.

Thanks for your contribution!

@CeliaGMqrz CeliaGMqrz merged commit d9b3adf into bitnami:main Feb 1, 2024
8 checks passed
@bpfoster bpfoster deleted the gh-issue52238 branch February 1, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grafana solved verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bitnami/grafana] Running grafana image with user init script causes error
4 participants