[LU-15170] PCC cache re-attach does not work in containers Created: 27/Oct/21  Updated: 16/May/22  Resolved: 11/Jan/22

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

Type: Bug Priority: Minor
Reporter: Patrick Farrell Assignee: Patrick Farrell
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-15484 sanity-pcc test_101a: could not map u... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

When doing re-attach/auto-attach of cached files for which the lock has been lost, PCC looks them up with kern_path.  However, kern_path is subject to namespaces, so if the user process is containerized, it will use the container namespace.

This means PCC must be mounted in the container namespace, which is not desirable.

Instead we can do a lookup with lookup_one_len, starting from the PCC root, which is in the true root file system and not subject to the container namespace.  It is correct to ignore the container namespace because PCC is file system caching functionality, and because the user can't control the PCC path, so it's not a potential security concern.



 Comments   
Comment by Gerrit Updater [ 02/Nov/21 ]

"Patrick Farrell <pfarrell@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45436
Subject: LU-15170 llite: Switch pcc to lookup_one_len
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 96c90859e14f3960b57eae54b3886aeef62f6f40

Comment by Gerrit Updater [ 11/Jan/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45436/
Subject: LU-15170 llite: Switch pcc to lookup_one_len
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: f3be560031cc7022a22f4c661f94ac7aa6f617f1

Comment by Peter Jones [ 11/Jan/22 ]

Landed for 2.15

Generated at Sat Feb 10 03:16:03 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.