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

fix: Memcached persistence #14049

Merged
merged 4 commits into from
Sep 25, 2024

Conversation

AndreZiviani
Copy link
Contributor

@AndreZiviani AndreZiviani commented Sep 4, 2024

What this PR does / why we need it:
Fixes the usage of persistence on Memcached:

  • Memcached must create a file smaller than disk size
  • ext_wbuf_size must be bigger than max item size and be divisible by wbuf_size which is 64 by default
  • Add pod permissions to access local volume

Which issue(s) this PR fixes:
Fixes #14028
Related #13619

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@AndreZiviani AndreZiviani requested a review from a team as a code owner September 4, 2024 17:42
@pull-request-size pull-request-size bot added size/M and removed size/S labels Sep 4, 2024
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Sep 4, 2024
@AndreZiviani
Copy link
Contributor Author

hey @chaudum please review this when you can

@pentago
Copy link

pentago commented Sep 20, 2024

why is this taking ages to merge?

@eric-engberg
Copy link

I don't think ext_wbuf_size should be hard coded. Users should be able to adjust this if needed

@AndreZiviani
Copy link
Contributor Author

I agree @eric-engberg but I could not think of a way to:

  • make it configurable by the user if needed
  • automatically add required options for persistency

any suggestions on how to do it?

Copy link
Contributor

@chaudum chaudum left a comment

Choose a reason for hiding this comment

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

@AndreZiviani Thanks! LGMT
I will merge once the merge conflicts are resolved.

@AndreZiviani
Copy link
Contributor Author

thanks @chaudum , done

@eric-engberg
Copy link

I agree @eric-engberg but I could not think of a way to:

  • make it configurable by the user if needed
  • automatically add required options for persistency

any suggestions on how to do it?

Just add it as a field in the values file. Under persistence maybe?

@chaudum
Copy link
Contributor

chaudum commented Sep 24, 2024

I agree @eric-engberg but I could not think of a way to:

  • make it configurable by the user if needed
  • automatically add required options for persistency

any suggestions on how to do it?

Just add it as a field in the values file. Under persistence maybe?

@eric-engberg Do you want to do that in a separate PR?

@AndreZiviani
Copy link
Contributor Author

since this is a somewhat complex and advanced usage I believe we shouldn't add any options automatically (I had some issued with this on loki-distributed helm), I've added it on previous PR because it looked like it was going to be simple but it is not

@chaudum
Copy link
Contributor

chaudum commented Sep 25, 2024

@AndreZiviani Seems like the branch needs to be updated again to resolve the conflicts. I'm ready to merge then.

@AndreZiviani
Copy link
Contributor Author

@chaudum done

@AndreZiviani
Copy link
Contributor Author

also looks like the CI for helm release is broken
#14258

@chaudum chaudum merged commit ee6e1cf into grafana:main Sep 25, 2024
66 checks passed
@chaudum
Copy link
Contributor

chaudum commented Sep 25, 2024

Thanks @AndreZiviani !

@AndreZiviani
Copy link
Contributor Author

release still failing btw
https://github.com/grafana/loki/actions/runs/11037391725

LashaJini pushed a commit to LashaJini/loki that referenced this pull request Sep 26, 2024
* Memcached must create a file smaller than disk size
* `ext_wbuf_size` must be bigger than max item size and be divisible by `wbuf_size` which is 64 by default
* Add pod permissions to access local volume
jeschkies pushed a commit to jeschkies/loki that referenced this pull request Oct 1, 2024
* Memcached must create a file smaller than disk size
* `ext_wbuf_size` must be bigger than max item size and be divisible by `wbuf_size` which is 64 by default
* Add pod permissions to access local volume
mraboosk pushed a commit to mraboosk/loki that referenced this pull request Oct 7, 2024
* Memcached must create a file smaller than disk size
* `ext_wbuf_size` must be bigger than max item size and be divisible by `wbuf_size` which is 64 by default
* Add pod permissions to access local volume
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm size/M type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helm: persistent cache item_size_max: 5242880 cannot be larger than ext_wbuf_size: 4194304
4 participants