[MDEV-22192] Implement something similar to version_source_revision for the Galera library Created: 2019-06-27  Updated: 2020-04-14  Resolved: 2020-04-14

Status: Closed
Project: MariaDB Server
Component/s: Galera
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Marko Mäkelä Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

It would be useful to know which exact version of the Galera library is being used, especially when testing unreleased development versions of the library. This could save a lot of time when diagnosing failures that occur in a continuous integration system.

The MariaDB server exposes version_source_revision. Could the Galera library source revision be exposed in some way?

(Note: git submodule revision numbers are implied by version_source_revision. I am referring to libraries that are built or loaded independently of the source code revision of the server.)



 Comments   
Comment by Julien Fritsch [ 2019-06-28 ]

teemu.ollakka this would help us a lot. Is this something that can be done quickly, please ?

Comment by Teemu Ollakka [ 2019-06-28 ]

Currently Galera exposes status variable wsrep_provider_version which should include also the revision. It seems that if the revision is not given as argument to scons command, the revision is replaced with XXXX as in 3.26(rXXXX). Would it suffice to fix this to get the git revision automatically during build process if not explicitly specified?

Comment by Julien Fritsch [ 2019-06-28 ]

Thank you teemu.ollakka. marko and sysprg what you think?

Comment by Marko Mäkelä [ 2019-06-28 ]

This sounds very reasonable and simple enough to me.
We could have a .test file without a .result that will cause the version string to be echoed into the mysql-test-run.pl log.
(Or should we display it in the server error log when loading the plugin, to help in future support cases?)

Comment by Julien Fritsch [ 2019-07-01 ]

sysprg or jplindst what do you think?

Comment by Jan Lindström (Inactive) [ 2019-07-02 ]

Reasonable and simple enough to me. Currently we already print server error log: wsrep loader: [INFO] wsrep_load(): Galera 4.2(rXXXX) by Codership Oy <info@codership.com> loaded successfully. but again revision is missing.

Comment by Julien Fritsch [ 2019-07-02 ]

Thank you jplindst. I guess that we need now to agree on what we what to be done and to update the description of this task, before to ask teemu.ollakka to plan to do it.

jplindst can you update the description of this tasks with the detailed scope, please? Don't want to write anything stupid myself.

Comment by Teemu Ollakka [ 2019-07-05 ]

There are two ways to pass the revision to build scripts:

  • Give argument revno=<revision> to scons command during build process
  • Write a file GALERA_REVISION containing desired revision number into build root (does not work with out-of-source builds)

Argument revno=<revision> takes always precedence if given.

Revision number can be obtained by git command git log --pretty=format:'%h' -n1.

How to pass this information to scons during package build process depends on how the packages are build. For deb packages the revno is passed via environment variable, as in DEB_BUILD_OPTIONS="revno=<revision>". Could not figure out from build scripts how MariaDB Galera rpm is built.

Comment by Julien Fritsch [ 2019-11-20 ]

jplindst this has been forgotten, can you update it please?

Comment by Jan Lindström (Inactive) [ 2020-04-14 ]

This will be released when next Galera library versions are released i.e.
25.3.30 and 26.4.5.

Generated at Thu Feb 08 09:12:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.