Skip to content

Commit

Permalink
Fix issue with container's run method
Browse files Browse the repository at this point in the history
Whenever some commands are run using `PodmanClient().images.run`
method, the status goes from `CREATED` TO `EXITED` without passing
through the `RUNNING` state (or it could happen so fast that
the state is missed).

This is an issue because `container.wait(condition="running")` is
expecting the `RUNNING` condition, and this causes the client to hang.

See #102

Signed-off-by: Abdulwasiu Apalowo <abdulwasiuapalowo@gmail.com>
  • Loading branch information
mrbazzan committed Jun 30, 2022
1 parent 21a48cb commit ae2cd34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion podman/domain/containers_run.py
Expand Up @@ -64,7 +64,7 @@ def run(
container = self.create(image=image, command=command, **kwargs)

container.start()
container.wait(condition="running")
container.wait(condition="exited")
container.reload()

if kwargs.get("detach", False):
Expand Down

0 comments on commit ae2cd34

Please sign in to comment.