URL:
https://github.com/SSSD/sssd/pull/5712
Title: #5712: Health and Support Analyzer - Add request log parsing utility
justin-stephenson commented:
"""
Some issues I have noticed testing more use cases:
1. If the SSSD backend is offline (down backend server), failed `id username` command
does not indicate this
```
# sssctl analyze request --list
ldb: unable to dlopen /usr/lib64/ldb/modules/ldb/memberof.la :
/usr/lib64/ldb/modules/ldb/memberof.la: invalid ELF header
******** Listing nss client requests ********
(2021-07-28 14:39:56: CID #1: id
- User by name
- administrator(a)ad.vm
# sssctl analyze request --cid=1
ldb: unable to dlopen /usr/lib64/ldb/modules/ldb/memberof.la :
/usr/lib64/ldb/modules/ldb/memberof.la: invalid ELF header
******** Checking nss responder for Client ID 1 *******
(2021-07-28 14:39:56): [nss] [cache_req_send] (0x0400): CR #0: REQ_TRACE: New request
[CID #1] 'User by name'
********* Checking Backend for Client ID 1 ********
(2021-07-28 14:39:56): [be[ad.vm]] [dp_attach_req] (0x0400): [RID#2] DP Request [Account
#2]: REQ_TRACE: New request. [sssd.nss CID #1] Flags [0x0001].
(2021-07-28 14:39:56): [be[ad.vm]] [dp_attach_req] (0x0400): [RID#2] Number of active DP
request: 1
(2021-07-28 14:39:56): [be[ad.vm]] [sss_domain_get_state] (0x1000): [RID#2] Domain ad.vm
is Active
(2021-07-28 14:39:56): [be[ad.vm]] [dp_attach_req] (0x0400): [RID#3] DP Request [Account
#3]: REQ_TRACE: New request. [sssd.nss CID #1] Flags [0x0001].
(2021-07-28 14:39:56): [be[ad.vm]] [dp_attach_req] (0x0400): [RID#3] Number of active DP
request: 1
(2021-07-28 14:39:56): [be[ad.vm]] [sss_domain_get_state] (0x1000): [RID#3] Domain ad.vm
is Active
```
-- This is because the tool is grepping for the tevent chain ID numbers, but the offline
log message does not include the tevent request ID
```
(2021-07-28 14:35:05): [be[ad.vm]] [sbus_issue_request_done] (0x0040):
sssd.dataprovider.getAccountInfo: Error [1432158212]: SSSD is offline
```
@pbrezina Is there a way to get the tevent chain ID logged in this sbus `SSSD is offline`
message shown above? I guess not based on the comment in
https://github.com/SSSD/sssd/blob/master/src/sbus/router/sbus_router_hand... ?
If not I would need to parse the timestamps returned from the RID backend messages, and
then search for regex like `$timestamp.*SSSD is offline` but that is prone to errors. Or
does someone have a better suggestion?
"""
See the full comment at
https://github.com/SSSD/sssd/pull/5712#issuecomment-890110770