Bug 2214444

Summary: The sss lookup modules handles error return incorrectly in some cases
Product: Red Hat Enterprise Linux 8 Reporter: Ian Kent <ikent>
Component: autofsAssignee: Ian Kent <ikent>
Status: VERIFIED --- QA Contact: Kun Wang <kunwan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.8CC: pbrezina, xzhou
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: ikent: needinfo? (pbrezina)
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: autofs-5.1.4-106.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2215661 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2215661    
Attachments:
Description Flags
Patch - fix some sss error return cases none

Description Ian Kent 2023-06-13 02:03:39 UTC
Description of problem:
The autofs sss lookup module handles error returns incorrectly in some cases.
This leads to automount not waiting for a host to become available (if it's down at the time the master map read is attempted) so that a map not found error is returned when it shouldn't be, for example the "automount -m" command.

Version-Release number of selected component (if applicable):
Current version of autofs.

Comment 1 Ian Kent 2023-06-13 02:16:16 UTC
It's not that easy to reproduce this problem because an ldap server
needs to be setup to provide autofs map information to a client setup
to use sss. What makes it even harder is that the ldap server needs
to be down and then be started up to test the functionality.

But if this is done then an "automount -m" command to read and
list the available maps should wait for a period of time before
giving up or succeeding as the case may be.


Fortunately, since Pavel would like to be able to verify this during
sss testing, we should be able to get help with testing.

Ian

Comment 2 Ian Kent 2023-06-13 02:19:09 UTC
Created attachment 1970553 [details]
Patch - fix some sss error return cases

This is currently against the upstream source and is completely untested.

Comment 4 Ian Kent 2023-06-19 01:49:26 UTC
Pavel,

autofs revision 106 is included in the most recent composes.
For example:
https://download.eng.bos.redhat.com/rhel-8/composes/RHEL-8/RHEL-8.9.0-20230618.d.21/compose/BaseOS/x86_64/os/Packages/autofs-5.1.4-106.el8.x86_64.rpm

You could get the debugsource and debuginfo packages from:
https://download.eng.bos.redhat.com/brewroot/packages/autofs/5.1.4/106.el8/x86_64/

if you needed them, in fact you could get all the packages for there.

Would you be able to check if this change helps with the error reporting
you were asking about please?