deckhouse / deckhouse/deckhouse

[global] go-applications, while exiting on error, tries to write logs to readonly /tmp

Open
#2,865 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority/backlog source/deckhouse-team type/bug type/good-first-issue
Dominant language
Go
Stars
1.3k
Forks
162
Avg merge
1d 5h
Merged PRs (30d)
653

Description

Preflight Checklist
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
Use case. Why is this important?

In deckhouse, we run applications with the read-only root filesystem, and we don't want to provide additional /tmp volume for each container. Unfortunately seems that golang's logger on the app crash tries to persist some logs for future investigation, but in the case of /tmp volume being emptyDir - we will lose those logs anyway.

Proposed Solution

Research and find the right flag.

Additional Information

cloud-controller-manager

log: exiting because of error: log: cannot create log: open /tmp/vsphere-cloud-controller-manager.p-golovin-vsphere-master-0.nobody.log.WARNING.20201217-085031.1: read-only file system

upmeter:

E1217 13:49:23.954032       1 reflector.go:320] pkg/mod/k8s.io/client-go@v0.17.0/tools/cache/reflector.go:108: Failed to watch *unstructured.Unstructured: Get "https://10.222.0.1:443/apis/deckhouse.io/v1alpha1/downtimes?allowWatchBookmarks=true&resourceVersion=6692&timeoutSeconds=499&watch=true": dial tcp 10.222.0.1:443: connect: connection refused
log: exiting because of error: log: cannot create log: open /tmp/upmeter.upmeter-0.nobody.log.ERROR.20201217-134923.1: read-only file system

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the go-applications logging configuration and researching the Go logger flag that controls writing crash logs to /tmp. Reproduce the failure with a read-only root filesystem in cloud-controller-manager or upmeter; done means an application error does not attempt to create log files in /tmp.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.