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

Why does server version show twice, when running with the compatibility socket ? #11227

Closed
afbjorklund opened this issue Aug 14, 2021 · 7 comments · Fixed by #11286
Closed

Why does server version show twice, when running with the compatibility socket ? #11227

afbjorklund opened this issue Aug 14, 2021 · 7 comments · Fixed by #11286
Assignees
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. Question Issue is a question about Podman

Comments

@afbjorklund
Copy link
Contributor

afbjorklund commented Aug 14, 2021

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

More of a question

Description

When I run "docker version" or "podman version", I get one client and one server output.

On the remote node:

$ docker version
Client: Docker Engine - Community
 Version:           20.10.7
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        f0df350
 Built:             Wed Jun  2 11:56:38 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.7
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       b0f5bc3
  Built:            Wed Jun  2 11:54:50 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.6
  GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
 runc:
  Version:          1.0.0-rc95
  GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

$ sudo podman --remote version
Client:
Version:      3.2.2
API Version:  3.2.2
Go Version:   go1.15.2
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd64

Server:
Version:      3.2.2
API Version:  3.2.2
Go Version:   go1.15.2
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd64

But when running docker client towards the podman socket, there are suddenly two ?

i..e two for podman itself, not just one for podman and more for conmon and crun or so

Steps to reproduce the issue:

  1. ssh-add $CONTAINER_SSHKEY
  2. export DOCKER_HOST=${CONTAINER_HOST/\/run\/podman\/podman.sock/}
  3. docker version

Describe the results you received:

Client: Docker Engine - Community
 Version:           20.10.8
 API version:       1.40
 Go version:        go1.16.6
 Git commit:        3967b7d
 Built:             Fri Jul 30 19:54:27 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: linux/amd64/ubuntu-20.04
 Podman Engine:
  Version:          3.2.2
  APIVersion:       3.2.2
  Arch:             amd64
  BuildTime:        1970-01-01T00:00:00Z
  Experimental:     true
  GitCommit:        
  GoVersion:        go1.15.2
  KernelVersion:    5.4.0-80-generic
  MinAPIVersion:    3.1.0
  Os:               linux
 Engine:
  Version:          3.2.2
  API version:      1.40 (minimum version 1.24)
  Go version:       go1.15.2
  Git commit:       
  Built:            Thu Jan  1 00:00:00 1970
  OS/Arch:          linux/amd64
  Experimental:     true

Describe the results you expected:

Guess I am wondering why there is extra information in the output.

And if so, more like:

Server: Podman Engine
 Engine:
  Version:          3.2.2
  API version:      1.40 (minimum version 1.24)
  Go version:       go1.15.2
  Git commit:       
  Built:            Thu Jan  1 00:00:00 1970
  OS/Arch:          linux/amd64
  Experimental:     true
 podman:
  Version:          3.2.2
  GitCommit:        
 conmon:
  Version:          2.0.27
  GitCommit:        
 runc:
  Version:          1.0.0-rc95
  GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7

Additional information you deem important (e.g. issue happens only occasionally):

The docker socket was symlinked to the podman socket, since Docker doesn't do paths...

ssh host connection is not valid: extra path after the host: "/run/podman/podman.sock"

This was after stopping the real Docker daemon, and running only with CRI-O (and podman)

sudo ln -sf /run/podman/podman.sock /var/run/docker.sock

Output of podman version:

podman version 3.2.2

Output of podman info --debug:

(paste your output here)

Package info (e.g. output of rpm -q podman or apt list podman):

podman/now 100:3.2.2-1 amd64 [installed,local]

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)

Yes/No

Additional environment details (AWS, VirtualBox, physical, etc.):

Ubuntu 20.04

@rhatdan
Copy link
Member

rhatdan commented Aug 16, 2021

Looks like a bug in the compatibility layer.
@jwhonce PTAL

@mheon
Copy link
Member

mheon commented Aug 17, 2021

We seem to be missing Git commit (seems useful), an "experimental" flag (I assume this means "this is not a formally-published release"?), and versions for Containerd and Runc (we don't use containerd and may not use runc - maybe replace with Conmon and OCI Runtime version?)

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Aug 17, 2021

@mheon the git commit is missing from the packaging itself (the binary), it should be showing up where available.

$ podman version --format=json | jq
{
  "Client": {
    "APIVersion": "3.2.3",
    "Version": "3.2.3",
    "GoVersion": "go1.15.2",
    "GitCommit": "",
    "BuiltTime": "Thu Jan  1 01:00:00 1970",
    "Built": 0,
    "OsArch": "linux/amd64"
  }
}

The RPM and DEB packages replace the make with their own hacks, so they miss out on the go linker flags...

(this also why they live in the 70's)

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Aug 17, 2021

an "experimental" flag (I assume this means "this is not a formally-published release"?)

the "experimental" means that beta features in the Docker CLI and API are enabled

It's a run-time configuration (opt-in), so not related to the actual binary or the release

/etc/docker/daemon.json

{
    "experimental": true
}

~/.docker/config.json

{
	"experimental": "enabled"
}

For Podman, it is hard-coded to true.

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Aug 17, 2021

Actually the question was not so much about those extra new features (even if nice-to-have), just about the extra fields:

With the older release, it looks more traditional:

Client: Docker Engine - Community
 Version:           19.03.15
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        99e3ed8
 Built:             Sat Jan 30 03:11:43 2021
 OS/Arch:           linux/amd64
 Experimental:      false

Server: linux/amd64/ubuntu-20.04
 Podman Engine:
  Version:          3.2.3
  APIVersion:       3.2.3
  Arch:             amd64
  BuildTime:        1970-01-01T01:00:00+01:00
  Experimental:     true
  GitCommit:        
  GoVersion:        go1.15.2
  KernelVersion:    5.4.0-80-generic
  MinAPIVersion:    3.1.0
  Os:               linux
 Engine:
  Version:          3.2.3
  API version:      1.40 (minimum version 1.24)
  Go version:       go1.15.2
  Git commit:       
  Built:            Thu Jan  1 01:00:00 1970
  OS/Arch:          linux/amd64
  Experimental:     true

While expecting more like:

Client: Docker Engine - Community
 Version:           19.03.15
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        99e3ed8
 Built:             Sat Jan 30 03:11:43 2021
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Podman Engine
 Engine:
  Version:          3.2.3
  API version:      1.40 (minimum version 1.24)
  Go version:       go1.15.2
  Git commit:       
  Built:            Thu Jan  1 01:00:00 1970
  OS/Arch:          linux/amd64
  Experimental:     true

@jwhonce jwhonce added the Question Issue is a question about Podman label Aug 19, 2021
@jwhonce
Copy link
Member

jwhonce commented Aug 19, 2021

@afbjorklund @rhatdan This is a "feature"...

In JSON payload, we provide compatible fields containing their expected versioning information, and additionally we provide a "Podman Engine" component containing libpod versioning information. The goal was a client that expected only docker fields would work as expected while an enhanced client with knowledge of libpod could leverage this additional information.

@afbjorklund
Copy link
Contributor Author

Okay thanks. Just wondered about the differences in output, if you want to add more components you can do that as a separate issue.

jwhonce added a commit to jwhonce/podman that referenced this issue Aug 19, 2021
* Include OCI and conmon information as components

Fixes containers#11227

Signed-off-by: Jhon Honce <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. Question Issue is a question about Podman
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants