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

Ensure OTel directories are writable #4090

Merged
merged 5 commits into from
Feb 13, 2025
Merged

Conversation

cbandy
Copy link
Member

@cbandy cbandy commented Feb 10, 2025

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • Bug fix

What is the current behavior (link to any open issues here)?

The pgAdmin log offsets are stored in /tmp to avoid conflicting permissions.

What is the new behavior (if this is a feature change)?

The pgAdmin log directories are created and updated to be writable during startup. Log offsets are now stored alongside logs.

internal/shell/paths.go Outdated Show resolved Hide resolved
This prevents log records from being emitted multiple times.
The `install` command only sets permissions on the final directory.
The `install` command only sets permissions on the final directory.

otelConfig.Extensions["file_storage/pgadmin_data_logs"] = map[string]any{
"directory": "/var/lib/pgadmin/logs/receiver",
"create_directory": false,
Copy link
Contributor

Choose a reason for hiding this comment

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

OK, so we're creating the /receiver directory in pod.go

shell.MakeDirectories(0o775, dataMountPath, path.Join(LogDirectoryAbsolutePath, "receiver")),

hmmm, not sure I have a question here, just interested in the different way we're doing this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've put TODOs elsewhere to create the directory using our function. This create_directory option does not do what we need in Kubernetes; opentelemetry-collector-contrib#37774

IMV, this directory is a collector concern and belongs in its (the sidecar's) shell entrypoint or other init.

@cbandy cbandy merged commit 88130ca into CrunchyData:main Feb 13, 2025
19 checks passed
@cbandy cbandy deleted the otel-directories branch February 13, 2025 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants