* Patch: Provide the offending UID/GID/name for which mapping fails we can debug the reasons
@ 2019-03-07 0:46 Richard Sharpe
2019-03-11 18:00 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Richard Sharpe @ 2019-03-07 0:46 UTC (permalink / raw)
To: Linux NFS Mailing List
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
Hi folks,
It is annoying to see these messages in /var/log/messages:
2019-03-04 23:15:23 nfsidmap[25468]: name_lookup: nfs4_gid_to_name:
failed: Unknown error -2
because you have no idea what UID/GID/name failed.
Attached is a git-format-patch patch to add the additional info to
those error messages.
It does not add any new messages.
Let me know what you think.
--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)
[-- Attachment #2: 0001-Provide-the-offending-UID-GID-name-for-which-mapping.patch --]
[-- Type: application/octet-stream, Size: 1422 bytes --]
From adcbb04b5ed6b056566285395a93d1f9cc155720 Mon Sep 17 00:00:00 2001
From: Richard Sharpe <realrichardsharpe@gmail.com>
Date: Tue, 5 Mar 2019 23:46:03 +0000
Subject: [PATCH] Provide the offending UID/GID/name for which mapping fails so
we can debug what is going on.
---
utils/nfsidmap/nfsidmap.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c
index d3967a3..fc00da7 100644
--- a/utils/nfsidmap/nfsidmap.c
+++ b/utils/nfsidmap/nfsidmap.c
@@ -205,8 +205,9 @@ static int id_lookup(char *name_at_domain, key_serial_t key, int type)
sprintf(id, "%u", gid);
}
if (rc < 0) {
- xlog_errno(rc, "id_lookup: %s: failed: %m",
- (type == USER ? "nfs4_owner_to_uid" : "nfs4_group_owner_to_gid"));
+ xlog_errno(rc, "id_lookup: %s: for %s failed: %m",
+ (type == USER ? "nfs4_owner_to_uid" : "nfs4_group_owner_to_gid"),
+ name_at_domain);
return EXIT_FAILURE;
}
@@ -262,8 +263,9 @@ static int name_lookup(char *id, key_serial_t key, int type)
rc = nfs4_gid_to_name(gid, domain, name, IDMAP_NAMESZ);
}
if (rc) {
- xlog_errno(rc, "name_lookup: %s: failed: %m",
- (type == USER ? "nfs4_uid_to_name" : "nfs4_gid_to_name"));
+ xlog_errno(rc, "name_lookup: %s: for %u failed: %m",
+ (type == USER ? "nfs4_uid_to_name" : "nfs4_gid_to_name"),
+ (type == USER ? uid : gid));
return EXIT_FAILURE;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Patch: Provide the offending UID/GID/name for which mapping fails we can debug the reasons
2019-03-07 0:46 Patch: Provide the offending UID/GID/name for which mapping fails we can debug the reasons Richard Sharpe
@ 2019-03-11 18:00 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2019-03-11 18:00 UTC (permalink / raw)
To: Richard Sharpe, Linux NFS Mailing List
On 3/6/19 7:46 PM, Richard Sharpe wrote:
> Hi folks,
>
> It is annoying to see these messages in /var/log/messages:
>
> 2019-03-04 23:15:23 nfsidmap[25468]: name_lookup: nfs4_gid_to_name:
> failed: Unknown error -2
>
> because you have no idea what UID/GID/name failed.
>
> Attached is a git-format-patch patch to add the additional info to
> those error messages.
>
> It does not add any new messages.
>
> Let me know what you think.
>
Committed...
Please, next time inline the patch.
steved.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-11 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 0:46 Patch: Provide the offending UID/GID/name for which mapping fails we can debug the reasons Richard Sharpe
2019-03-11 18:00 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).