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
Multiple simultaneous podman login commands can lose entries #1365
Comments
@mtrmac looks like we need to lock the auth.json file while we are updating it. |
Yeah, |
Read/Write lock each auth.json file before reading/writing it to prevent race coditions. Fixes: containers#1365 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Read/Write lock each auth.json file before reading/writing it to prevent race coditions. Fixes: containers#1365 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Read/Write lock each auth.json file before reading/writing it to prevent race coditions. Fixes: containers#1365 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Read/Write lock each auth.json file before reading/writing it to prevent race coditions. Fixes: containers#1365 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
... so that users can't observe an intermediate empty, or partial, file. (Note that there is still no locking, so two simultaneous updates to auth.json might lose some updates.) Avoids the worst behavior of containers#1365 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
... so that users can't observe an intermediate empty, or partial, file. (Note that there is still no locking, so two simultaneous updates to auth.json might lose some updates.) Fixes at least the worst impact of containers#1365 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
As of #1515 concurrent logins should not corrupt the file, but it’s possible that some of the concurrent updates will be lost. So, if there are multiple See #1506 for implementation discussion about locking that could fix the multiple-scope issue. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
If multiple
podman login
commands are executed simultaneously, you can get the errorSteps to reproduce the issue:
Describe the results you received:
Out of three login commands, 2 logins succeeded, and one got the error
Describe the results you expected:
I expected multiple simultaneous logins to work, with one of them ultimately "winning" and having its login info in wherever it gets stored.
Additional information you deem important (e.g. issue happens only occasionally):
This isn't a big deal for me. I can change our code so it only issues one login command. I just figured I'd file an issue.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Running podman inside another container in kubernetes.
The text was updated successfully, but these errors were encountered: