-
Notifications
You must be signed in to change notification settings - Fork 155
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
A way to remotely check system_version on nodes with "status" command #643
Comments
@vstax Thanks for your suggestion. Totally agreed and sorry for bothering you that we missed the exact version on each component. For a historical reason that we managed version numbers of each component independently, ### ASIS
find apps/ -type f|xargs grep "1\.3\." |grep -v eunit|grep -v Binary
apps/leo_gateway/ebin/leo_gateway.app: {vsn,"1.3.1"},
apps/leo_gateway/ebin/leo_gateway.app: {env,[{system_version,"1.3.0"},
apps/leo_gateway/rebar.config: {leo_object_storage, ".*", {git, "https://github.com/leo-project/leo_object_storage.git", {tag, "1.3.1"}}},
apps/leo_gateway/priv/leo_gateway.schema: {default, "1.3.2"}
apps/leo_gateway/src/leo_gateway.app.src: {vsn, "1.3.1"},
apps/leo_gateway/src/leo_gateway.app.src: {system_version, "1.3.0" },
apps/leo_storage/ebin/leo_storage.app: {vsn,"1.3.1"},
apps/leo_storage/rebar.config: {leo_object_storage, ".*", {git, "https://github.com/leo-project/leo_object_storage.git", {tag, "1.3.1"}}},
apps/leo_storage/priv/leo_storage.schema: {default, "1.3.2"}
apps/leo_storage/priv/leo_storage.schema:%% Leo' Object-Storage (v1.3.3-)
apps/leo_storage/priv/leo_storage.schema:%% Leo' Object-Storage (v1.3.3-)
apps/leo_storage/priv/leo_storage.schema:%% Leo' Object-Storage (v1.3.1-)
apps/leo_storage/priv/leo_storage.schema:%% Leo' Object-Storage (v1.3.1-)
apps/leo_storage/priv/leo_storage.schema:%% Leo' Object-Storage (v1.3.1-)
apps/leo_storage/src/leo_storage.app.src: {vsn, "1.3.1"},
apps/leo_manager/ebin/leo_manager.app: {vsn,"1.3.1"},
apps/leo_manager/ebin/leo_manager.app: {env,[{system_version,"1.3.0"},
apps/leo_manager/rebar.config: {leo_object_storage, ".*", {git, "https://github.com/leo-project/leo_object_storage.git", {tag, "1.3.1"}}},
apps/leo_manager/priv/leo_manager_0.schema: {default, "1.3.2"}
apps/leo_manager/priv/leo_manager_1.schema: {default, "1.3.2"}
apps/leo_manager/src/leo_manager.app.src: {vsn, "1.3.1"},
apps/leo_manager/src/leo_manager.app.src: {env, [{system_version,"1.3.0"},
### TOBE
### there is only one file to define a version like https://github.com/erlang/otp/blob/master/OTP_VERSION
### and every component include that version into each schema and app.src file when building packages.
LEOFS_VERSION
Agreed. ./leofs-adm version
[Version of Node(s)]
-------+--------------------------+--------------
type | node | version
-------+--------------------------+--------------
M | manager_0@127.0.0.1 | 1.3.3
M | manager_1@127.0.0.1 | 1.3.3
S | storage_0@127.0.0.1 | 1.3.3
G | gateway_0@127.0.0.1 | 1.3.2.1
-------+--------------------------+-------------- |
@mocchira Yes - this output look nice! Makes version check very simple for everyone (it might be best to use different command like "remote-version" or "versions", though, in order not to break current output of "version" for anyone. Even if no one actually relies on it right now, it's hard to be sure about it. Well, I'm not sure what current policy about such changes is). Based on your comment about all the different versions that should be the same, it looks like I was wrong about "version = 1.3.1" meaning something useful. So until a proper change is implemented, just replacing that 1.3.1 with actual version for all types of node will fix "status" output for the next release. |
Thanks for your suggestion. Notes that while we'd take care the backward compatibility in machine readable formats like JSON, ASIS output via JSON port$ ./leofs-adm version | python -m json.tool
{
"result": "1.3.2"
} TOBE output via JSON port$ ./leofs-adm version all | python -m json.tool
{
"result": [
{
"node": "manager_0@127.0.0.1",
"type": "M",
"version": "1.3.3"
},
{
"node": "manager_1@127.0.0.1",
"type": "M",
"version": "1.3.3"
},
{
"node": "storage_0@127.0.0.1",
"type": "S",
"version": "1.3.3"
},
{
"node": "gateway_0@127.0.0.1",
"type": "G",
"version": "1.3.2.1"
},
]
} TOBE output via text portthat would be same with the prev comment
Right. |
FIXED |
Right now, there seem to be no way to check LeoFS version that some node runs on. This is needed to ensure that every node was indeed updated and is running latest version - since during node-by-node upgrade on running system nothing prevents you to run different version on different nodes, it is possible to overlook upgrade of some node (missing a number, or maybe some node was offline during upgrade and so on) and forget to upgrade it.
Example, with LeoFS 1.3.2.1:
(note that this shows another problem: there is no way to differentiate between 1.3.2 and 1.3.2.1. I understand that it was a rushed bugfix release, still, it would be nice if release version was synchronized with system_version in repo. But this is another matter)
Gateway and storage nodes:
They are running the same 1.3.2.1, but show "version" as 1.3.1. As I understand, it's something internal and different from system_version parameter. I'm not sure if it's needed for something, but showing "system version" just like management nodes do in addition to just "version" (or maybe replacing it) is needed to check the real version of gateway/storage nodes.
(there is also "leofs-adm version" command which isn't that useful right now because it shows only management node version - which is available from "status" command anyway - and can't show version of remote nodes. Would be totally great if it could show version of all nodes directly instead, akin to "leofs-adm status" command which shows node list and information)
The text was updated successfully, but these errors were encountered: