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

Mangled positions results in promtail crash loop (k8s daemonset) #1460

Closed
owen-d opened this issue Dec 30, 2019 · 1 comment · Fixed by #1472
Closed

Mangled positions results in promtail crash loop (k8s daemonset) #1460

owen-d opened this issue Dec 30, 2019 · 1 comment · Fixed by #1472

Comments

@owen-d
Copy link
Member

owen-d commented Dec 30, 2019

What

If the positions file is corrupted/mangled somehow, it causes a promtail daemon to continually fail. Because it's mounted as a hostpath, it persists across both restarts and pod deletions/recreations on the same host and requires manual intervention to rectify. Perhaps this is desirable?

Ideas

  • delete a corrupted file, forcing all positions to be recreated/reset? We'd see out of order errors, but would these eventually catch up?
  • Leave as it is?
  • Flag to determine which strategy to use?

credit @pracucci :
An easy solution to avoid truncated files could be writing to a temporary file and then use a move syscall to move the file to the expected location (the move is atomic). This also allows you to verify the file written in tmp location before moving it.

/cc @slim-bean @rfratto

Origin

#1457

@owen-d owen-d changed the title Mangled positions results in crash loop Mangled positions results in promtail crash loop (k8s daemonset) Dec 30, 2019
@owen-d
Copy link
Member Author

owen-d commented Jan 6, 2020

It looks like we made writes to the positions file atomic on November 21 2019: fd25e6d.

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 a pull request may close this issue.

1 participant