Give database version in console system:status command
#408
C-Duv
started this conversation in
Ideas and feature requests
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The CLI/Console's
system:statuscommand has a database "db" section where it gives information about database status.{ "glpi": { "status": "OK" }, "db": { "status": "OK", "main": { "status": "OK" }, "replicas": { "status": "NO_DATA", "servers": [] } }, … }I think it would be useful (for unattended deployment/provisioning) to know what's the database version and whether it's up-to-date or not.
This information can be added to the
system:statuscommand which would, on a outdated database, output something like:{ "glpi": { "status": "OK" }, "db": { "status": "OK", "version": { "installed": "11.0.6@84160e91f70f353b33495a7928e5b1476d4b6d98", "defined": "11.0.8@7b129479687ebafebb6966eaa1d72cb683390613", "uptodate": false }, "main": { "status": "OK" }, "replicas": { "status": "NO_DATA", "servers": [] } }, … }and, on a up-to-date database:
{ "glpi": { "status": "OK" }, "db": { "status": "OK", "version": { "installed": "11.0.8@7b129479687ebafebb6966eaa1d72cb683390613", "defined": "11.0.8@7b129479687ebafebb6966eaa1d72cb683390613", "uptodate": true }, "main": { "status": "OK" }, "replicas": { "status": "NO_DATA", "servers": [] } }, … }Example use case:
Your Ansible task wants to install a plugin after updating GLPI: the
bin/console plugin:installcommand will fail until GLPI has been updated.When
plugin:installis attempted, output is as follows:Calling idempotent
system:statuscommand to read JSON'sdb.version.uptodatekey would tell Ansible if it has to runbin/console database:update.All reactions