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

LU-13969 tests: Updates to lustre-release yaml.sh

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.

Lustre-commit: f90199b1
Lustre-change: https://review.whamcloud.com/39952



Change-Id: Ia011f944aae53f31fcd3a539e846ea5aba7ec7c4
Signed-off-by: default avatarLee Ochoa <lochoa@whamcloud.com>
Reviewed-by: default avatarAndreas Dilger <adilger@whamcloud.com>
Reviewed-by: default avatarJames Nunez <jnunez@whamcloud.com>
Reviewed-by: default avatarOleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/40402

Tested-by: default avatarjenkins <devops@whamcloud.com>
Tested-by: default avatarAndreas Dilger <adilger@whamcloud.com>
Tested-by: default avatarMaloo <maloo@whamcloud.com>
parent 41dfe594
......@@ -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) }' \
/etc/SuSE-release)
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' \
/etc/os-release)
/etc/os-release)
dist="${name} ${version}"
elif [ -r /etc/system-release ]; then
dist=$(awk '/release/ \
{ printf("%s %s %s", $1, $2, $3) }' \
/etc/system-release)
elif [ -r /etc/*-release ]; then
dist=$(find /etc/ -maxdepth 1 -name '*release' 2> /dev/null | \
sed -e 's/\/etc\///' -e 's/-release//' | head -n1)
else
dist="UNKNOWN"
fi
......@@ -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
version: $LUSTRE_VERSION
build: $LUSTRE_BUILD
branch: $LUSTRE_BRANCH
revision: $LUSTRE_REVISION
kernel_version: $(uname -r)
file_system: ${FILE_SYSTEM:-"NA"}
EOF
......
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