Open Taomyn opened 2 months ago
Same issue here. I'm using podman 4.9.3 from Ubuntu 24.04 repo. It seems podman pod inspect
returns an object directly while podlet expects a list of a single object. Not sure if it's different between versions.
$ sudo podman pod inspect wordpress | head
{
"Id": "5b0473e939e5aab57a52b22aa5dc4c4777d207ed75ea38d0e02b66027e0f2bea",
"Name": "wordpress",
"Created": "2024-09-07T14:12:21.939185473-07:00",
"CreateCommand": [
"/usr/bin/podman",
"pod",
"create",
"--infra-conmon-pidfile",
"/run/pod-wordpress.pid",
I recently updated to Fedora 40, which is running podman v5.2.2, but now when I run the generate I get the following:
Error:
0: error creating Quadlet file(s) from an existing object
1: error parsing `podman pod create` command from `["podman", "pod", "create", "--name", "ChangeDetection", "--publish", "5000:5000/tcp"]`
2: error: unexpected argument '--name' found
tip: to pass '--name' as a value, use '-- --name'
2: Usage: create [OPTIONS] <NAME>
For more information, try '--help'.
2:
Location:
src/cli/generate.rs:277
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Running podman inspect like @cuihaoleo and it returns:
[
{
"Id": "01fd7d82e13d9fc67af0d555835352c28b5a1e773ace66cc80581f023328ec44",
"Name": "ChangeDetection",
"Created": "2024-08-16T16:02:18.008505774+02:00",
"CreateCommand": [
"podman",
"pod",
"create",
"--name",
The second error you are hitting is a due to #88. The first is because podman pod inspect
changed it's output to always be an array in Podman v5.0.0. It should be changed so that it works with older versions as well.
The second error you are hitting is a due to #88. The first is because
podman pod inspect
changed it's output to always be an array in Podman v5.0.0. It should be changed so that it works with older versions as well.
My second report was for Podman v5.2.2 so what's "older versions"? I can't say what Fedora 39 was running when I first reported my issue which is shame.
My second report was for Podman v5.2.2 so what's "older versions"?
Podman versions less than 5.0.0, so v4.9.5 and earlier. You can see the change in the Podman v5.0.0 release notes under "Breaking Changes" in the 7th bullet point.
Should I create a separate issue now that mine has moved on to being with Podman v5.2.2?
I have downloaded podlet 0.3.0 binary for my Fedora 39 server in order to start converting my pods from using the old "podman generate systemd" to quadlets.
When I run the command "./podlet generate pod ChangeDetection" it shows: