[LU-9533] obdfilter-survey cannot find Lustre version number Created: 18/May/17  Updated: 07/Jun/17  Resolved: 07/Jun/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.10.0
Fix Version/s: Lustre 2.10.0

Type: Improvement Priority: Minor
Reporter: James Nunez (Inactive) Assignee: Gregoire Pichon
Resolution: Fixed Votes: 0
Labels: easy, hackathon2017, test

Rank (Obsolete): 9223372036854775807

 Description   

obdfilter-survey looks for the Lustre version to see if the variable rszmax should be changed

 253 check_record_size() {
 254         [ $(version_code $(get_lustre_version)) -lt $(version_code 2.3.61) ] &&
 255                 rszmax=1024
...

In logs for obdfilter survey, we see an error when trying to check the Lustre version. For example, in the suite_stdout log for https://testing.hpdd.intel.com/test_sets/586ba2cc-3bb7-11e7-b3f6-5254006e85c2, we see

07:44:33:/usr/bin/obdfilter-survey: line 242: ( << 16) | ( << 8) | : syntax error: operand expected (error token is "<< 16) | ( << 8) | ")
07:44:33:/usr/bin/obdfilter-survey: line 254: [: -lt: unary operator expected

We get the version with

 245 get_lustre_version() {
 246         local host=${1:-${unique_hosts[0]}}
 247         remote_shell $host $lctl get_param -n version |
 248                 awk '/^lustre:/ {print $2}'
 249 }

The problem is that the string "lustre" is no longer returned with the lctl call

# lctl get_param -n version
2.9.56_70_g3dad616

The call to 'lctl get_param' should be not to pipe the results to awk.



 Comments   
Comment by Andreas Dilger [ 20/May/17 ]

I'm pretty sure I fixed this in master. Please check test-framework.sh for the existing version functions, which this should probably use. Those functions will return a version regardless of whether the kernel modules are loaded or not.

Comment by James Nunez (Inactive) [ 30/May/17 ]

I wasn't very clear in the description of this ticket. The obdfilter-survey this ticket refers to is the one located in lustre-iokit. That's the reason ti doesn't use the get version code in test-framework.sh.

Comment by Gerrit Updater [ 30/May/17 ]

Grégoire Pichon (gregoire.pichon@bull.net) uploaded a new patch: https://review.whamcloud.com/27338
Subject: LU-9533 tests: fix get_lustre_version in obdfilter-survey
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e3ac0b930f7530f1b3fb98ef0957ea99778a00c9

Comment by Gerrit Updater [ 30/May/17 ]

James Nunez (james.a.nunez@intel.com) uploaded a new patch: https://review.whamcloud.com/27341
Subject: LU-9533 test: update how to get version in obdfilter-survey
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: fa0d283b9fbbef8f8b2314efe5fafc853f049d73

Comment by James Nunez (Inactive) [ 30/May/17 ]

Gregoire - I see great minds think alike.

Comment by Gerrit Updater [ 07/Jun/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/27338/
Subject: LU-9533 tests: fix get_lustre_version in obdfilter-survey
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 94aa5f7af1dab41d255b03c1552cdbbca6724bc1

Comment by Peter Jones [ 07/Jun/17 ]

Landed for 2.10

Generated at Sat Feb 10 02:27:01 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.