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

Storing the tempo-query binary under /tmp in the docker image causes problems when running on a read-only fs #434

Closed
kimble opened this issue Jan 4, 2021 · 4 comments
Labels
stale Used for stale issues / PRs

Comments

@kimble
Copy link

kimble commented Jan 4, 2021

Describe the bug
https://github.com/grafana/tempo/blob/master/cmd/tempo-query/Dockerfile#L6-L9

The tempo-query docker image ships with the binary under /tmp. Some k8s envs are configured with read only file systems so in order to have a writeable /tmp that have to be mounted which in turn removes the binary. To make matters worse the base image
ships without any utils that would make it possible to move the binary using an init container.

Expected behavior
The binary to somewhere other then /tmp :-)

Environment:

  • Infrastructure: Kubernetes
@joe-elliott
Copy link
Member

Yeah, the storing the file in /tmp is a hack b/c the GRPC plugin panic'ed if no /tmp folder existed. Heads up that in the near future we intend to drop the requirement for tempo-query and hopefully this problem will go away for you.

#382

Will leave this open b/c I think it should be fixed anyway.

@kimble
Copy link
Author

kimble commented Jan 4, 2021

Sounds great!

For anyone with the same problem:
I managed to work around the issue by setting $TEMP=/tmp2 and mounting a new volume in that directory.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2022

This issue has been automatically marked as stale because it has not had any activity in the past 60 days.
The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed after 15 days if there is no new activity.
Please apply keepalive label to exempt this Issue.

@github-actions github-actions bot added the stale Used for stale issues / PRs label Dec 5, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2022
@Hronom
Copy link

Hronom commented Jul 5, 2023

Nowadays you need to use env variable TMPDIR, so proper config for tempo-distributed helm chart will be:

  queryFrontend:
    query:
      enabled: true
      # Inspired by https://github.com/grafana/tempo/issues/434#issuecomment-754033103
      extraEnv:
        - name: TMPDIR
          value: /tmp2
      extraVolumeMounts:
        - mountPath: /tmp2
          name: tmp2
    extraVolumes:
      - name: tmp2
        emptyDir: { }

This is useful if you need to enable Kiali to work with Tempo. Related issue here:
kiali/kiali#4278
kiali/kiali#5848

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Used for stale issues / PRs
Projects
None yet
Development

No branches or pull requests

3 participants