Whamcloud - gitweb
LU-16591 build: use vendor tag for LUSTRE_FIX 36/50136/3
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 24 Feb 2023 19:15:40 +0000 (12:15 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 Mar 2023 03:28:58 +0000 (03:28 +0000)
Improve the regexp for the LUSTRE_FIX (fourth) component of the
LUSTRE_VERSION parsing so that if there is an additional component
in the version like "2.15.2-abc123" the "123" will be reported as
the fourth component of the version in obd_connect_data.ocd_version.
If there is already a fix version specified (e.g. 2.15.2.4-abc123)
then it will continue to be used for LUSTRE_FIX instead of the extra
"-abcNN" value.

The build version is shown in "{mdt,obdfilter}.*.exports.*.export"
param on servers for connected clients, and in "{mdc,osc}.*.import"
param on clients for connected servers.  Displaying the full version
improves debuggability of remote peers to know their specific build
instead of showing the first three digits and always ".0" at the end.

Since ocd_version is a numeric field it is not possible to include
the "abc" part of the version string on the peer nodes.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I96b38f99b2522c5ea3f3b3e2ddd7cd64f1ce7057
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50136
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
config/lustre-version.m4

index d5485af..307a372 100644 (file)
@@ -5,7 +5,7 @@ AC_DEFUN([LUSTRE_VERSION_CPP_MACROS], [
 LUSTRE_MAJOR=`echo AC_PACKAGE_VERSION | sed -re ['s/([0-9]+)\.([0-9]+)\.([0-9]+)(\.([0-9]+))?.*/\1/']`
 LUSTRE_MINOR=`echo AC_PACKAGE_VERSION | sed -re ['s/([0-9]+)\.([0-9]+)\.([0-9]+)(\.([0-9]+))?.*/\2/']`
 LUSTRE_PATCH=`echo AC_PACKAGE_VERSION | sed -re ['s/([0-9]+)\.([0-9]+)\.([0-9]+)(\.([0-9]+))?.*/\3/']`
-LUSTRE_FIX=`echo AC_PACKAGE_VERSION | sed -re ['s/([0-9]+)\.([0-9]+)\.([0-9]+)(\.([0-9]+))?.*/\5/']`
+LUSTRE_FIX=`echo AC_PACKAGE_VERSION | sed -re ['s/([0-9]+)\.([0-9]+)\.([0-9]+)([-\._][a-z]*([0-9]+))?.*/\5/']`
 AS_IF([test -z "$LUSTRE_FIX"], [LUSTRE_FIX="0"])
 
 AC_DEFINE_UNQUOTED([LUSTRE_MAJOR], [$LUSTRE_MAJOR], [First number in the Lustre version])