hyperhq / hyperd

HyperContainer Daemon
http://www.hypercontainer.io
Apache License 2.0
1.98k stars 194 forks source link

Hyperctl / Hyperd version #747

Open opahopa opened 6 years ago

opahopa commented 6 years ago

Hi, is there a command argument to check hyperd/hyperctl version? not in the commands / arguments here https://docs.hypercontainer.io/reference/index.html (and not in hyperctl / hyperd --help)

jonaagenilsen commented 6 years ago

Not delicate.. but

yum list installed | egrep "hyper-|hyperstart"
hyper-container.x86_64               1.1.0-1.el7                       installed
hyperstart.x86_64                    1.1.0-1.el7                       installed
opahopa commented 6 years ago

yeah know that, thanks. wandering about existing of any kind of --version flag in hyperctl/hyperd, since running yum list installed | egrep "hyper-|hyperstart" certainly must take more execution time. (in my use case it is relatively important)

gnawux commented 6 years ago

you may find the version at the beginning of the logs (by default /var/log/hyper/hyperd.INFO):

I0924 10:30:44.809559   20376 hyperd.go:189] Hyper daemon: 1.1.0
gnawux commented 6 years ago

And checked with the code

# hyperctl version
The hyperctl version is 1.1.0

It's supported

opahopa commented 6 years ago

And checked with the code

# hyperctl version
The hyperctl version is 1.1.0

It's supported

haha thanks! tried different options but not without -. (since it's not in help / docs)

gnawux commented 6 years ago

One more thing, you may query the server with API

# echo -e "GET /version HTTP/1.0\r\n" | nc -U /var/run/hyper.sock
HTTP/1.0 200 OK
Content-Type: application/json
Server: Docker/library-import (linux)
Date: Mon, 24 Sep 2018 14:40:27 GMT
Content-Length: 31

{"ID":20376,"Version":"1.1.0"}
gnawux commented 6 years ago

Both the client side and server side. I think it should be documented