-
Notifications
You must be signed in to change notification settings - Fork 244
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
Provide support in odo version for podman #6806
Comments
Grooming (2023-06-01) If Podman does not respond after the timeout (1s currently), it should report that Podman is not available.. |
Apart from the podman server version, is there any other information you need? @mohitsuman |
I was just thinking that we would also need to implement JSON output for
|
@valaparthvi so the podman server version is shown only if the podman is running, or it also detects from the system whether user has podman binary installed or not ? And with @rm3l comment, it would be great to have JSON output for |
True. I am working on that. I guess we can print the complete podman Client information that we have, instead of just the version. WDYT? $ odo version
odo v3.11.0 (0acf1a5af)
Server: https://kubernetes.docker.internal:6443
Kubernetes: v1.25.9
Podman (Client): 4.5.1
$ odo version -o json
{
"version": "odo v3.11.0 (0acf1a5af)",
"serverURL": "https://kubernetes.docker.internal:6443",
"kubernetesVersion": "v1.25.9",
"openShiftVersion": "",
"podmanVersion": "4.5.1"
}
I am still not sure I completely understand the difference between podman client, and server and whether only checking one is sufficient. TLDR; odo requires podman CLI on the system, so we use client information; if the server is down, odo will error out, returning the error it received from podman client. There is more information that we can display about Podman in type Version struct {
APIVersion string
Version string
GoVersion string
GitCommit string
BuiltTime string
Built int64
OsArch string
Os string
} $ podman version
Client: Podman Engine
Version: 4.5.1
API Version: 4.5.1
Go Version: go1.20.4
Git Commit: 9eef30051c83f62816a1772a743e5f1271b196d7
Built: Fri May 26 20:40:12 2023
OS/Arch: darwin/arm64
[...] |
I'd advocate for returning only the bare minimum for now. Otherwise, it might be difficult to change it later once the fields are there. So only the podman client version for now, I think. {
"version": "v3.11.0",
"gitCommit": "0acf1a5af",
"cluster": {
"serverURL": "https://kubernetes.docker.internal:6443",
"kubernetes": {
"version": "v1.25.9"
},
"openshift": {
"version": "4.13.0"
}
},
"podman": {
"client": {
"version": "4.5.1"
}
}
} This way, I think it will be simpler to extend in the future.. What do you think?
I think the client uses a server if there is a "system connection" configured (e.g., case of a Podman Machine started locally or remotely). The client version is not returned by Podman if there is an error connecting to the server. So I think it should be okay for us to only check the client version reported:
Also, if the call to get the client version does not return in a timely manner,
+1 |
I like that idea, it's much much better! Let's do that. |
Currently when we run odo commands on podman, we should also understand if podman is running or not in the user system.
The
odo version
command can verify that and list down in the podman version (if running). It should send this information as json so the IDE extension can leverage it and make an informed decision beforehand that whether the system has podman started.The text was updated successfully, but these errors were encountered: