[LU-15240] some lfs mirror extend error messages start with "lfs mirror mirror" Created: 16/Nov/21 Updated: 06/Dec/21 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | John Hammond | Assignee: | Aleksei Alyaev (Inactive) |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
Some error messages from "lfs mirror extend" start with "lfs mirror mirror" others start with "error: ". Both should start with "lfs mirror extend: ". # lfs mirror extend -N -p ddn_ssd f0 lfs mirror mirror: cannot get UNLOCK lease, ext 4: Device or resource busy (16) error: lfs mirror extend: f0: cannot merge layout: Device or resource busy The first message should include the file path or at least FID. Paths should be enclosed in single quotes. We should not print two errors for the same message. |
| Comments |
| Comment by John Hammond [ 16/Nov/21 ] |
|
aalyaev could you take a look at this? |
| Comment by Aleksei Alyaev (Inactive) [ 16/Nov/21 ] |
|
Sure. |
| Comment by Aleksei Alyaev (Inactive) [ 24/Nov/21 ] |
|
jhammond there are a few places in lfs.c where a global variable progname gets set to "lfs COMMAND [...]" instead of just "lfs". char cmd[PATH_MAX]; ... snprintf(cmd, sizeof(cmd), "%s %s", progname, argv[0]); progname = cmd; ...
snprintf(cmd, sizeof(cmd), "%s %s", progname, argv[0]);
progname = cmd;
program_invocation_short_name = cmd;
|
| Comment by John Hammond [ 29/Nov/21 ] |
|
Can you push a patch to make it do the right thing? |
| Comment by Aleksei Alyaev (Inactive) [ 29/Nov/21 ] |
|
Yes, was already working on it, it's almost ready. |
| Comment by Aleksei Alyaev (Inactive) [ 06/Dec/21 ] |
|
Hi jhammond, LU-15240 looks good according to local tests ... all modes report the errors correctly, as far as the source of error is concerned. If you can take a quick look and review the changeset... The errors should change from: lfs mirror mirror: cannot get UNLOCK lease, ext 4: Device or resource busy (16) error: lfs mirror extend: f0: cannot merge layout: Device or resource busy to: lfs mirror: cannot get UNLOCK lease, ext 4: Device or resource busy (16) error: lfs mirror extend: f0: cannot merge layout: Device or resource busy I did not yet enclose the file name in the second message (f0) in single quotes, as the source of error was a more global issue. Let me know if this needs addressing? Neither did I change the fact that 2 message get printed, as one of them comes from liblustreapi, while the second one is lfs util specific. Doing so would break this pattern in many other places of lfs utility, where errors get reported similarly. Let me know what else needs to be done here. |