feat: add /var/lib persistent state directories for collector RPM/DEB packages#1395
Open
dol wants to merge 1 commit intoopen-telemetry:mainfrom
Open
feat: add /var/lib persistent state directories for collector RPM/DEB packages#1395dol wants to merge 1 commit intoopen-telemetry:mainfrom
dol wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
Author
|
CC: Include @swiatekm @VihasMakwana as code owners of the File Storage Extension to this change. |
2572b74 to
793fa2a
Compare
mowies
reviewed
Mar 2, 2026
… packages Add packaged /var/lib/<package> directories to otelcol, otelcol-contrib, and otelcol-otlp distributions. These directories are needed for the file_storage resiliency extension which persists the collector queue to disk. See https://opentelemetry.io/docs/collector/resiliency/ - Add withVarLibDir(user, group) helper in builder.go - Set mode 0750 (rwxr-x---) owned by the service user/group - Regenerate .goreleaser.yaml files for affected distributions
793fa2a to
b705581
Compare
mowies
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RPM/DEB packages for
otelcol,otelcol-contrib, andotelcol-otlpwere missing/var/lib/<package>directories, preventing the file_storage extension from persisting queue state on disk without manual post-install setup.Extension is mentioned as part of Resiliency improvements.
Changes
cmd/goreleaser/internal/builder.go— addswithVarLibDir(user, group string)helper that appends an nfpmtype: dircontent entry at/var/lib/<package>, owned by the service user/group at mode0750cmd/goreleaser/internal/distro_otelcol.go,distro_contrib.go,distro_otlp.go— each callswithVarLibDirwith its respective service user/group.goreleaser.yamlfiles for all three distributions updated accordinglyResulting nfpm entry (example for
otelcol-contrib):Service users are created by the existing
preinstall.shscripts, so no additional scripting is required.