Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1382602

Summary: autofs map resolution doesn't work offline
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Hrozek <jhrozek>
Component: sssdAssignee: SSSD Maintainers <sssd-maint>
Status: CLOSED ERRATA QA Contact: Niranjan Mallapadi Raghavender <mniranja>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: grajaiya, ianh, jhrozek, lslebodn, mkolaja, mkosek, mzidek, orion, pbrezina, sgoveas, tscherf
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.15.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1382603 1398673 (view as bug list) Environment:
Last Closed: 2017-08-01 09:00:03 UTC Type: ---
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: 1101782, 1382603, 1398673    

Description Jakub Hrozek 2016-10-07 07:08:03 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/3140

to reproduce the autofs maps failure:
    * automount -m      # to verify the maps are there
    * pkill -USR1 sssd  # make sssd go offline
    * automount -m      # to verify the maps are there

Comment 1 Jakub Hrozek 2016-10-07 07:10:46 UTC
master: b9e155da725e711ab306ca8a96e3ba6fbda41a3a

Comment 11 Niranjan Mallapadi Raghavender 2017-05-10 12:05:42 UTC
Versions:
==========
Red Hat Enterprise Linux Server release 7.4 Beta (Maipo)
libsss_autofs-1.15.2-26.el7.x86_64
sssd-common-1.15.2-26.el7.x86_64
sssd-dbus-1.15.2-26.el7.x86_64
python-sssdconfig-1.15.2-26.el7.noarch
sssd-ipa-1.15.2-26.el7.x86_64
sssd-kcm-1.15.2-26.el7.x86_64
sssd-common-pac-1.15.2-26.el7.x86_64
sssd-ldap-1.15.2-26.el7.x86_64
sssd-1.15.2-26.el7.x86_64
sssd-client-1.15.2-26.el7.x86_64
sssd-krb5-common-1.15.2-26.el7.x86_64
sssd-krb5-1.15.2-26.el7.x86_64
sssd-ad-1.15.2-26.el7.x86_64


Steps:
1. Join system to 2012 AD 
realm join CENTAUR.TEST --client-software=sssd --server-software=active-directory --membership-software=adcli -v


2. Set autofs provider to AD
[sssd]
config_file_version = 2
domains = CENTAUR.TEST
services = nss, pam, autofs
debug_level = 9

[domain/CENTAUR.TEST]
id_provider = ad
auth_provider = ad
access_provider = ad
autofs_provider = ad
fallback_homedir = /home/%d/%u
use_fully_qualified_names = True
debug_level = 9

3. Modify /etc/nsswitch.conf to get automount maps from sss backend

automount:  files sss
aliases:    files nisplus
sudoers:    files 


4. Start sssd service

root     15799     1  0 17:30 ?        00:00:00 /usr/sbin/sssd -i -f
root     15800 15799  1 17:30 ?        00:00:03 /usr/libexec/sssd/sssd_be --domain CENTAUR.TEST --uid 0 --gid 0 --debug-to-files
root     15801 15799  0 17:30 ?        00:00:00 /usr/libexec/sssd/sssd_nss --uid 0 --gid 0 --debug-to-files
root     15802 15799  0 17:30 ?        00:00:00 /usr/libexec/sssd/sssd_pam --uid 0 --gid 0 --debug-to-files
root     15803 15799  0 17:30 ?        00:00:00 /usr/libexec/sssd/sssd_autofs --uid 0 --gid 0 --debug-to-files


5. Make sssd offline
pkill -USR1 sssd

(Wed May 10 17:30:48 2017) [sssd] [signal_offline] (0x2000): Signaling providers to go offline immediately.
(Wed May 10 17:30:48 2017) [sssd] [sbus_add_timeout] (0x2000): 0x7f87441ff3a0
(Wed May 10 17:30:48 2017) [sssd] [sbus_remove_timeout] (0x2000): 0x7f87441ff3a0
(Wed May 10 17:30:48 2017) [sssd] [sbus_dispatch] (0x4000): dbus conn: 0x7f87441f3c20
(Wed May 10 17:30:48 2017) [sssd] [sbus_dispatch] (0x4000): Dispatching.


6. Run automount -m
[root@idm1 sssd]# automount  -m

autofs dump map information
===========================

global options: none configured

Mount point: /misc

source(s):

  instance type(s): file 
  map: /etc/auto.misc

  cd | -fstype=iso9660,ro,nosuid,nodev  :/dev/cdrom


Mount point: /net

source(s):

  type: hosts

  idm2.example.test | (null)
  client1.example.test | (null)
  srv1.centaur.test | (null)
  idm1.example.test | (null)
  localhost | (null)


Mount point: /home

source(s):
100000000|lookup_read_map: lookup(sss): getautomntent_r: No such file or directory

  instance type(s): sss 
  map: auto.home

  no keys found in map


Mount point: /-

source(s):

  instance type(s): sss 
  map: auto.direct

  /export | -fstype=nfs,rw idm2.example.test:/export


7. Access nfs share.

[root@idm1 sssd]# ls -l /export/nfs-test 
-rw-r--r--. 1 root root 0 May 10 17:29 /export/nfs-test

Comment 12 errata-xmlrpc 2017-08-01 09:00:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:2294