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

podman uses wrong event log file path on the first run with new storage location #8694

Closed
Luap99 opened this issue Dec 11, 2020 · 0 comments · Fixed by #8696
Closed

podman uses wrong event log file path on the first run with new storage location #8694

Luap99 opened this issue Dec 11, 2020 · 0 comments · Fixed by #8696
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@Luap99
Copy link
Member

Luap99 commented Dec 11, 2020

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Podman uses the wrong file path for the event log file when run in a new storage location but only for the first call after that the correct location is used.

Steps to reproduce the issue:

window 1:

  1. podman --events-backend file events

window 2:

  1. tmp=$(mktemp -d)

  2. podman --events-backend file --tmpdir $tmp --runroot $tmp/runroot --root $tmp/root create --name t1 alpine

  3. podman --events-backend file --tmpdir $tmp --runroot $tmp/runroot --root $tmp/root create --name t2 alpine

  4. podman --events-backend file --tmpdir $tmp --runroot $tmp/runroot --root $tmp/root events --since 1h

Describe the results you received:
First event is logged in the standard event log file path. Second event is logged in the new tmp path location.

Describe the results you expected:
Both events should be logged in the new location.

Output of podman version:
master @ dd95478

@Luap99 Luap99 self-assigned this Dec 11, 2020
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 11, 2020
@Luap99 Luap99 added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Dec 11, 2020
Luap99 pushed a commit to Luap99/libpod that referenced this issue Dec 11, 2020
The podman events aren't read until the given timestamp if the
timestamp is in the future. It just reads all events until now
and exits afterwards.
This does not make sense and does not match docker. The correct
behavior is to read all events until the given time is reached.

This fixes a bug where the wrong event log file path was used
when running first time with a new storage location.
Fixes containers#8694

This also fixes the events api endpoint which only exited when
an error occurred. Otherwise it just hung after reading all events.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants