[LU-14910] sanity-sec test 51 fails with 'setcap CAP_CHOWN' Created: 04/Aug/21  Updated: 21/Jun/22  Resolved: 21/Jun/22

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

Type: Bug Priority: Minor
Reporter: James Nunez (Inactive) Assignee: Charlie Olmstead
Resolution: Fixed Votes: 0
Labels: None
Environment:

SLES15 SP2 clients


Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

sanity-sec test_51 started failing with 'setcap CAP_CHOWN' on 06 APRIL 2021 with Lustre 2.14.51.42 for SLES15 SP2 only. This test fails for SLES12 SP5 clients about 72% of the time.

Looking at the logs of a recent failure at https://testing.whamcloud.com/test_sets/4657f55b-3160-4093-b9f4-ebad90cd2943, we see the test output in the suite_log

== sanity-sec test 51: FS capabilities =============================================================== 09:20:25 (1627982425)
running as uid/gid/euid/egid 500/500/500/500, groups:
 [/mnt/lustre/d51.sanity-sec/chown] [500] [/mnt/lustre/d51.sanity-sec/f51.sanity-sec]
/mnt/lustre/d51.sanity-sec/chown: changing ownership of '/mnt/lustre/d51.sanity-sec/f51.sanity-sec': Operation not permitted
/usr/lib64/lustre/tests/sanity-sec.sh: line 3730: setcap: command not found
 sanity-sec test_51: @@@@@@ FAIL: setcap CAP_CHOWN 
  Trace dump:
  = /usr/lib64/lustre/tests/test-framework.sh:6220:error()
  = /usr/lib64/lustre/tests/sanity-sec.sh:3730:test_51()

There are several instances of this failure:
https://testing.whamcloud.com/test_sets/534c4bf0-6c5d-40df-bce0-4180178a7bdf
https://testing.whamcloud.com/test_sets/cdc2cff3-bc35-4441-8be9-1342d0959e26
https://testing.whamcloud.com/test_sets/5a151fe2-83a9-41cc-a323-2f288c4cb532



 Comments   
Comment by James A Simmons [ 04/Aug/21 ]

Sounds like a missing package.

Comment by Andreas Dilger [ 04/Aug/21 ]

The setcap command is part of "libcap" on my RHEL systems.

Comment by James A Simmons [ 05/Aug/21 ]

Is libcap-prog installed for the SuSE images?

Comment by James Nunez (Inactive) [ 23/Nov/21 ]

Charlie - Could you comment on if this package is installed?

Comment by Charlie Olmstead [ 29/Nov/21 ]

libcap-progs is not installed on sles

Comment by Charlie Olmstead [ 21/Jun/22 ]

This appears to be fixed. I installed sles12sp5, sles15sp2 and sles15sp3 and all have the setcap command

~$ for i in `seq 1 3`; do ssh -q root@onyx-20vm${i} "lsb_release -d; which setcap"; done
Description:    SUSE Linux Enterprise Server 12 SP5
/sbin/setcap
Description:    SUSE Linux Enterprise Server 15 SP3
/usr/sbin/setcap
Description:    SUSE Linux Enterprise Server 15 SP2
/usr/sbin/setcap 
Generated at Sat Feb 10 03:13:49 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.