Closed gbraad closed 3 years ago
Using https://github.com/containers/podman/releases/tag/v2.0.6 seems to work on the Command Prompt:
C:\Users\gbraad\Downloads\podman>.\podman.exe system connection add --identity C:\Users\gbraad\.crc\machines\crc\id_ecdsa --port 2222 crc core@127.0.0.1
C:\Users\gbraad\Downloads\podman>podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
C:\Users\gbraad\Downloads\podman>podman version
Client:
Version: 2.0.6
API Version: 1
Go Version: go1.14.6
Git Commit: 27362ba1ad8879ea71610fa68a651a1651e0180f
Built: Wed Sep 2 01:08:00 2020
OS/Arch: windows/amd64
Server:
Version: 2.0.5
API Version: 0
Go Version: go1.14.7
Built: Thu Sep 24 00:18:02 2020
OS/Arch: linux/amd64
C:\Users\gbraad\Downloads\podman>
Although it works from PowerShell, it will always complain about the console mode (Filed as issue: #9100)
PS> ./podman ps
time="2021-01-26T14:28:58+08:00" level=error msg="Failed to set console mode for cli" error="The parameter is incorrect."
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
PS> ./podman version
time="2021-01-26T14:29:15+08:00" level=error msg="Failed to set console mode for cli" error="The parameter is incorrect."
Client:
Version: 2.0.6
API Version: 1
Go Version: go1.14.6
Git Commit: 27362ba1ad8879ea71610fa68a651a1651e0180f
Built: Wed Sep 2 01:08:00 2020
OS/Arch: windows/amd64
Server:
Version: 2.0.5
API Version: 0
Go Version: go1.14.7
Built: Thu Sep 24 00:18:02 2020
OS/Arch: linux/amd64
In other words; there is no backwards compatibility for the client when using a higher version with an older server component.
@gbraad in your first comment, after you added the connection ... did it get set to the default? podman system connection ls
should indicate the default connection with a *
. If it isn't set, try setting the default and seeing if your command works.
It was the only connection (and default)
crc* C:\Users\gbraad\.crc\machines\crc\id_ecdsa ssh://core@127.0.0.1:2222/run/user/1000/podman/podman.sock
you noticed it failed with:
Error: failed to parse 'podman info' results: json: cannot unmarshal number into Go struct field Version.version.APIVersion of type string
In the info this says for RHCOS (podman 2.0.5):
version:
APIVersion: 1
Built: 1600877882
BuiltTime: Wed Sep 23 16:18:02 2020
GitCommit: ""
GoVersion: go1.14.7
OsArch: linux/amd64
Version: 2.0.5
While on Fedora 33 (podman 2.1.1) this is:
version:
APIVersion: 2.1.0
Built: 1607438270
BuiltTime: Tue Dec 8 22:37:50 2020
GitCommit: ""
GoVersion: go1.15.5
OsArch: linux/amd64
Version: 2.2.1
notet the APIVersion.
It changed in c4b49afad37b4e64a1aa2b90f4d3b04626fabd44 - I don't think there is compatibility between 2.0 and 2.1, so you need to use a 2.0 client ?
Same thing with 1.9, due to using a different protocol and socket. So far, 2.2 server seems to work with 3.0 client...
But the API bumped from 2.0.0 to 3.0.0 so there are no guarantees.
Version | API | Commit |
---|---|---|
1.9 | varlink | |
2.0 | 1 |
5c8e7ed0dee117c9d423849f09f82d15957893a8 |
2.1 | 2.0.0 |
c4b49afad37b4e64a1aa2b90f4d3b04626fabd44 |
2.2 | 2.1.0 |
02843f881f9271440e7eaad8db231ddf20e33e51 |
3.0 | 3.0.0 |
12f835d125bda9c6971258d54e627b8b2acf859a |
For now I am stuck on 2.0.6 as client which seems to work. So, yeah. Can confirm this behaviour, but not as expected.
From what I can tell, the podman3 server is still using podman2 protocol. Or I guess that should read "Podman 2.1+"
Client:
Version: 3.0.0-rc1
API Version: 3.0.0
Go Version: go1.15.5
Git Commit: 1cbe815ee74e835f72ee7c63857126b5aedbee39
Built: Fri Jan 22 17:28:01 2021
OS/Arch: linux/amd64
Server:
Version: 3.0.0-rc1
API Version: 2.0.0
Go Version: go1.15.5
Git Commit: 1cbe815ee74e835f72ee7c63857126b5aedbee39
Built: Fri Jan 22 17:27:52 2021
OS/Arch: linux/amd64
I'm just going to write "Podman 2.1 or later" for my requirements, and leave support for 1.6 and 2.0 as RHEL exclusive...
Eh?
Alright, that's a bug. Supposed to be 3.0 on both ends.
Alright, that's a bug. Supposed to be 3.0 on both ends.
Should I open an issue, seems to be the same with RC2 ?
Client:
Version: 3.0.0-rc2
API Version: 3.0.0
Go Version: go1.15.5
Git Commit: 510a983a752a136a5df0bdbff9d14db0490956b2
Built: Sun Jan 31 18:56:25 2021
OS/Arch: linux/amd64
Server:
Version: 3.0.0-rc2
API Version: 2.0.0
Go Version: go1.15.5
Git Commit: 510a983a752a136a5df0bdbff9d14db0490956b2
Built: Sun Jan 31 18:56:08 2021
OS/Arch: linux/amd64
Should this really be "Libpod" twice ?
// LibpodTree supports Libpod endpoints
LibpodTree = VersionTree(iota)
// CompatTree supports Libpod endpoints
CompatTree
Not sure difference between "CurrentAPIVersion" and "APIVersion" ?
// APIVersion provides the current and minimal API versions for compat and libpod endpoint trees
// Note: GET|HEAD /_ping is never versioned and provides the API-Version and Libpod-API-Version headers to allow
// clients to shop for the Version they wish to support
APIVersion = map[VersionTree]map[VersionLevel]semver.Version{
LibpodTree: {
CurrentAPIVersion: semver.MustParse("2.0.0"),
MinimalAPIVersion: semver.MustParse("2.0.0"),
},
CompatTree: {
CurrentAPIVersion: semver.MustParse("1.40.0"),
MinimalAPIVersion: semver.MustParse("1.24.0"),
},
}
// APIVersion is the version for the remote
// client API. It is used to determine compatibility
// between a remote podman client and its backend
var APIVersion = semver.MustParse("3.0.0")
Found a third place, in the bindings (podman-remote)
// APIVersion - podman will fail to run if this value is wrong
APIVersion = semver.MustParse("2.0.0")
If only that is changed, it's compatible-like-python:
Error: Cannot connect to the Podman socket, make sure there is a Podman REST API service running.: server API version is too old. Client "3.0.0" server "2.0.0"
Fail to see where the version negotiation is taking place ?
It seems to assume that server version is always newer.
Yep, please open a bug. I thought I hit everywhere when I bumped us to 3.0.0-dev, but clearly I missed one.
Since this is now fixed in podman 3.0, I am going to close this issue. Reopen if I am mistaken.
Since this is now fixed in podman 3.0, I am going to close this issue. Reopen if I am mistaken.
It probably won't fix it for podman 2.0, so there one has to keep using the podman 2.0 client...
Might want to document those shortcomings, when running older servers ? (before version 2.1)
But seems to be working for podman 2.2, so as long as client is 2.1+ (not 1.9, not 2.0) it's OK.
Client:
Version: 2.1.1
API Version: 2.0.0
Go Version: go1.15.5
Built: Thu Jan 1 01:00:00 1970
OS/Arch: linux/amd64
Server:
Version: 3.0.0-dev
API Version: 3.0.0
Go Version: go1.15.5
Git Commit: c421127dd7f700829a8e5265d8ddad102061bebc
Built: Fri Feb 5 13:19:30 2021
OS/Arch: linux/amd64
Client:
Version: 2.2.1
API Version: 2.1.0
Go Version: go1.15.2
Built: Thu Jan 1 01:00:00 1970
OS/Arch: linux/amd64
Server:
Version: 3.0.0-dev
API Version: 3.0.0
Go Version: go1.15.5
Git Commit: c421127dd7f700829a8e5265d8ddad102061bebc
Built: Fri Feb 5 13:19:30 2021
OS/Arch: linux/amd64
If I understand the original bug report (above), this might be something to document on the RHCOS 4.7 side ?
When I execute the following command
an error is returned:
The command
provides the following output:
The client used was: https://github.com/containers/podman/releases/tag/v2.2.1
podman-remote-release-windows.zip