Commit f90199b1 authored by Lee Ochoa's avatar Lee Ochoa Committed by Oleg Drokin
Browse files

LU-13969 - Updates to lustre-release

Updated output of release() function to standarize node.yml file
os_distribution parameter. Changes as follows:

RHEL   - use redhat-release first and os-release as backup as the latter may
         not include the full version (major/minor)
CENTOS - use centos-release first and os-release as backup, same as RHEL
SUSE   - use os-release instead of suse-release as the latter is deprecated
UBUNTU - use os-release

Removed parsing system-release and *-release as neither
option correctly outputs desired info

Removed "lustre_" references in node.yml file attributes, the default in Maloo
is to look for non-lustre prefixes first

Change-Id: Ia011f944aae53f31fcd3a539e846ea5aba7ec7c4
Signed-off-by: default avatarLee Ochoa <>

Tested-by: default avatarjenkins <>
Reviewed-by: default avatarAndreas Dilger <>
Reviewed-by: default avatarJames Nunez <>
Tested-by: default avatarMaloo <>
Reviewed-by: default avatarOleg Drokin <>
parent b00f4d80
......@@ -75,24 +75,19 @@ yml_code_review() {
release() {
if [ -r /etc/SuSE-release ]; then
name=$(awk '/SUSE/ { printf("%s %s %s %s", $1, $2, $3, $4) }' \
version=$(sed -n -e 's/^VERSION = //p' /etc/SuSE-release)
level=$(sed -n -e 's/^PATCHLEVEL = //p' /etc/SuSE-release)
dist="${name} ${version}.${level}"
rhel_pat=".*release \([[:digit:]]\+\.[[:digit:]]\+\).*"
if [ -r /etc/centos-release ]; then
version=$(sed -n -e "s/${rhel_pat}/\1/p" /etc/centos-release)
dist="CentOS ${version}"
elif [ -r /etc/redhat-release ]; then
version=$(sed -n -e "s/${rhel_pat}/\1/p" /etc/redhat-release)
dist="RHEL ${version}"
elif [ -r /etc/os-release ]; then
name=$(sed -n -e 's/"//g' -e 's/^NAME=//p' /etc/os-release)
version=$(sed -n -e 's/"//g' -e 's/^VERSION_ID=//p' \
dist="${name} ${version}"
elif [ -r /etc/system-release ]; then
dist=$(awk '/release/ \
{ printf("%s %s %s", $1, $2, $3) }' \
elif [ -r /etc/*-release ]; then
dist=$(find /etc/ -maxdepth 1 -name '*release' 2> /dev/null | \
sed -e 's/\/etc\///' -e 's/-release//' | head -n1)
......@@ -112,10 +107,10 @@ cat <<EOF
architecture: $(uname -m)
os: $(uname -o)
os_distribution: $TEST_DISTRO
lustre_version: $LUSTRE_VERSION
lustre_build: $LUSTRE_BUILD
lustre_branch: $LUSTRE_BRANCH
lustre_revision: $LUSTRE_REVISION
kernel_version: $(uname -r)
file_system: ${FILE_SYSTEM:-"NA"}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment