[LU-13683] lfs migrate on non-existing file returns exit code 0 Created: 16/Jun/20  Updated: 11/May/21  Resolved: 19/Nov/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.14.0, Lustre 2.12.5
Fix Version/s: Lustre 2.14.0

Type: Bug Priority: Trivial
Reporter: Sebastien Piechurski Assignee: Sebastien Piechurski
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Since merge of LU-11510, lfs migrate on a non-existing file will give the following error "lfs migrate: can't create composite layout from file /some/path/to/file" and will exit with code 0, potentially leaving a calling script unaware of the error.

 

The non-existing file is caught earlier than before by the call to llapi_layout_get_by_path() in lfs_setstripe_internal(), which does not return error code.

However, it sets errno in case of failure, but this is not used by the caller, which gets out without setting the exit code.



 Comments   
Comment by Gerrit Updater [ 16/Jun/20 ]

Sebastien Piechurski (sebastien.piechurski@atos.net) uploaded a new patch: https://review.whamcloud.com/38953
Subject: LU-13683 lfs: return -ENOENT when invoked on non-existing file
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ff0cef46b957a865002c3548477427e2969714a8

Comment by Gerrit Updater [ 19/Nov/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38953/
Subject: LU-13683 lfs: return -ENOENT when invoked on non-existing file
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 52d7cb5913c1e653a89d3a4de5f39c0e596dd28c

Comment by Gerrit Updater [ 19/Nov/20 ]

Sebastien Piechurski (sebastien.piechurski@atos.net) uploaded a new patch: https://review.whamcloud.com/40709
Subject: LU-13683 lfs: return -ENOENT when invoked on non-existing file
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 3011a34558e3b1510790b862e31c852c5c2b09f8

Comment by Peter Jones [ 19/Nov/20 ]

Landed for 2.14

Comment by Olaf Faaland [ 11/May/21 ]

Peter,
Do you know why the b2_12 backport of this patch, https://review.whamcloud.com/#/c/40709/ , hasn't landed? It's passed review and testing, it seems.
thanks,

Comment by Peter Jones [ 11/May/21 ]

We take a conservative approach on what we land for the LTS releases to limit the amount of risk/change that goes into each release. This means that just because something could be included that it necessarily will.

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