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

JsonDataError { message: "unknown variant stopped in ContainerStateStatusEnum with podman 4.4.2 #293

Closed
jiridanek opened this issue Mar 9, 2023 · 3 comments

Comments

@jiridanek
Copy link

let final_inspect = docker.inspect_container(&*container.id, Some(InspectContainerOptions { size: false })).await.unwrap();
thread 'testcontainers::test_h2spec::test_h2spec' panicked at 'called `Result::unwrap()` on an `Err` value: JsonDataError { message: "unknown variant `stopped`, expected one of ``, `created`, `running`, `paused`, `restarting`, `removing`, `exited`, `dead` at line 1 column 192", column: 192 }', tests/testcontainers/test_h2spec.rs:359:119

It looks like there is one additional state possible in

/// - `status`=(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)

/// String representation of the container state. Can be one of \"created\", \"running\", \"paused\", \"restarting\", \"removing\", \"exited\", or \"dead\".
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<ContainerStateStatusEnum>,

I am using bollard = "0.14.0" and podman version 4.4.2. I am starting podman with

systemctl --user enable --now podman.socket
export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock
@fussybeaver
Copy link
Owner

Thanks for reporting.. There was a similar issue a while back: #238

The thread concluded that these differences are resolved with their podman compat layer.. can you check if that works for you? Would be good to put the solution down in the README somewhere.

@jiridanek
Copy link
Author

I thought I'm using the compat API when I point bollard to the podman.sock. I don't really see what else I could be using, since bollard knows nothing about the libpod versions.

Anyways, looking at

it appears that both APIs have stopped state in there.

When I look at the podman issue created for #238, there I see link to the moby API, which does not seem to have stopped in there

So, could it be that the podman compat API is not compat enough?

@jiridanek
Copy link
Author

Anyways, I'm going to raise this in podman as containers/podman#17728

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

No branches or pull requests

2 participants