[LU-10627] tests/utils: lhsmtool_posix now runs lt-lhsmtool_posix and breaks tests Created: 07/Feb/18  Updated: 05/Aug/20  Resolved: 06/Aug/18

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

Type: Bug Priority: Minor
Reporter: CEA Assignee: James A Simmons
Resolution: Fixed Votes: 0
Labels: HSM, patch, test

Issue Links:
Related
is related to LU-10514 all metadata operations take 1+ minut... Resolved
is related to LU-11039 Wrong HSMTOOL_BASE name when kill cop... Resolved
is related to LU-11742 ERROR: RPATH is not allowed Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

When running tests locally lhsmtool_posix is a bash script that internally runs lustre/utils/.libs/lt-lhsmtool_posix. I assume this is due to the use of libtool in the compilation process.

Running pgrep "lhsmtool_posix" now yields no pid since the actual process is named "lt-lhsmtool_posix".
This breaks quite a lot of tests in sanity-hsm.



 Comments   
Comment by John Hammond [ 07/Feb/18 ]

Hi Quentin,

Yes this is due to libtoolization of lustre/utils/ done by https://review.whamcloud.com/30562 LU-5541 build: move libcfs and liblustreapi over to libtool.

I have been using ./configure --disable-shared as a workaround for this issue when I am doing local testing. There may be a better fix for this but I do not know it.

Comment by James A Simmons [ 07/Feb/18 ]

I have an idea. Can you try and changeĀ 

export LD_LIBRARY_PATH=${LUSTRE}/utils:${LD_LIBRARY_PATH}

in test-framework.sh to

export LD_LIBRARY_PATH=${LUSTRE}/utils/.libs:${LD_LIBRARY_PATH}

Let me know if that works.

Comment by Quentin Bouget [ 09/Feb/18 ]

Hi John,

Your workaround works for me, thanks!

Hi James,

I tried what you suggested (before using ./configure --disable-shared) but it did not work. The main issue is that sanity-hsm uses killall "lhsmtool_posix" to kill copytools (unlike pkill, killall only affects processes whose name fully matches its arguments). Since internally, the libtool-generated lhsmtool_posix calls exec lt-lhsmtool_posix, killall fails to find any matching process.

Comment by James A Simmons [ 04/May/18 ]

Now that I'm testing Ubuntu 18 on my local system I will be testing lustre without installing it so I will look to fix this. The easy way to fix this is change $LUSTRE/utils/ to $LUSTRE/utils/.libs but I'm also looking at using env to properly set the PATH variable so the right application would be used.

Comment by James A Simmons [ 19/Jul/18 ]

Okay I looked into this problem and found the solution. If you add the following it disables creating libtool executable wrappers.
prog_LDFLAGS = -no-install

Comment by Gerrit Updater [ 19/Jul/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/32835
Subject: LU-10627 tests: don't use libtool wrapper for applications
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 3e6fcf41eb85af32899fefcccc303b07eb61c111

Comment by Gerrit Updater [ 06/Aug/18 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32835/
Subject: LU-10627 tests: don't use libtool wrapper for applications
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: fd472f9427931092bab8d676798bc3f9744a552b

Comment by James A Simmons [ 06/Aug/18 ]

Landed for 2.12

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