From ee67a78cf2b102230dc3a7beea2274866e643224 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 24 Feb 2023 12:15:40 -0700 Subject: [PATCH] LU-16591 build: use vendor tag for LUSTRE_FIX 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 Change-Id: I96b38f99b2522c5ea3f3b3e2ddd7cd64f1ce7057 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50136 Tested-by: jenkins Tested-by: Maloo Tested-by: Shuichi Ihara Reviewed-by: Arshad Hussain Reviewed-by: Shuichi Ihara Reviewed-by: Alex Deiter Reviewed-by: Oleg Drokin --- config/lustre-version.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/lustre-version.m4 b/config/lustre-version.m4 index d5485af..307a372 100644 --- a/config/lustre-version.m4 +++ b/config/lustre-version.m4 @@ -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]) -- 1.8.3.1