Bug 1676981 - ipa-client-automount exception backing up /etc/sysconfig/nfs
Summary: ipa-client-automount exception backing up /etc/sysconfig/nfs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: François Cami
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-13 17:38 UTC by Scott Poore
Modified: 2019-06-14 01:45 UTC (History)
12 users (show)

Fixed In Version: ipa-4.7.1-11.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-14 01:45:53 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Scott Poore 2019-02-13 17:38:33 UTC
Description of problem:

When running ipa-client-automount, I see failures.  In debug mode I see this:

Backing up system configuration file '/etc/sysconfig/nfs'
-> Not backing up - '/etc/sysconfig/nfs' doesn't exist
Raised exception [Errno 2] No such file or directory: '/etc/sysconfig/nfs'
Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
IPA server: host-8-252-16.testrelm.test
Location: nis
Installation failed. Rolling back changes.
IPA automount is not configured on this system

If I touch /etc/sysconfig/nfs beforehand, it works.

Version-Release number of selected component (if applicable):
ipa-client-4.7.1-7.module+el8+2554+7a4ca32b.x86_64
nfs-utils-2.3.3-13.el8.x86_64

How reproducible:
Always. At least in some test environments.

Steps to Reproduce:
1.  Setup IPA server and some automount map entries
2.  ipa-client-automount --debug --server=$SERVER --location=$LOCATION -U

Actual results:
Fails

Expected results:
Works and sets up client properly.

Additional info:

Comment 1 Scott Poore 2019-02-13 20:01:16 UTC
FYI, I think this is related to the fix in bug #1673685

Comment 2 François Cami 2019-02-18 13:54:31 UTC
We should backup /etc/nfs.conf instead if I remember correctly.

Comment 3 François Cami 2019-02-18 14:13:08 UTC
Cloned upstream: https://pagure.io/freeipa/issue/7868

Comment 7 Florence Blanc-Renaud 2019-02-21 14:57:20 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/7868

Comment 8 François Cami 2019-02-26 16:37:18 UTC
nfs-utils-2.3.3-5.rc2.fc30 ( https://koji.fedoraproject.org/koji/buildinfo?buildID=1208012 ) introduced that change for Fedora:

* Mon Feb 11 2019 Steve Dickson <steved@redhat.com> 2.3.3-5.rc2
 - Do not install /etc/sysconfig/nfs (bz 1668836)
 - Change nfsconvert.sh not to set the immutable bit (bz 1668836)
 - Change nfsconvert.py not to create the new dummy /etc/sysconfig/nfs (bz 1668836)

Comment 13 François Cami 2019-02-26 17:14:45 UTC
WIP PR: https://github.com/freeipa/freeipa/pull/2862

Comment 16 François Cami 2019-02-27 20:46:05 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/c69875c8afdd877baf7139c0cd5241f70105cbd4

Comment 18 François Cami 2019-02-27 22:34:20 UTC
Fixed upstream
ipa-4-7:
https://pagure.io/freeipa/c/2ee160d189042a356c1ba9bb91214f2a495cc10d

Comment 19 Scott Poore 2019-02-28 00:28:02 UTC
Verified

Version::

ipa-client-4.7.1-11.module+el8+2843+a16c4825.x86_64

Results::

# ipa-client-install --principal admin --password Secret123 -U
This program will set up IPA client.
Version 4.7.1

Discovery was successful!
Client hostname: rhel8-2.example.com
Realm: EXAMPLE.COM
DNS Domain: example.com
IPA Server: rhel8-1.example.com
BaseDN: dc=example,dc=com

Synchronizing time
No SRV records of NTP servers found and no NTP server or pool address was provided.
Using default chrony configuration.
Attempting to sync time with chronyc.
Time synchronization was successful.
Successfully retrieved CA cert
    Subject:     CN=Certificate Authority,O=EXAMPLE.COM
    Issuer:      CN=Certificate Authority,O=EXAMPLE.COM
    Valid From:  2019-02-27 23:34:18
    Valid Until: 2039-02-27 23:34:18

Enrolled in IPA realm EXAMPLE.COM
Created /etc/ipa/default.conf
Configured sudoers in /etc/nsswitch.conf
Configured /etc/sssd/sssd.conf
Configured /etc/krb5.conf for IPA realm EXAMPLE.COM
Systemwide CA database updated.
Hostname (rhel8-2.example.com) does not have A/AAAA record.
Missing reverse record(s) for address(es): 192.168.122.82.
Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub
Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub
WARNING: The configuration pre-client installation is not managed by authselect and cannot be backed up. Uninstallation may not be able to revert to the original state.
SSSD enabled
Configured /etc/openldap/ldap.conf
Configured /etc/ssh/ssh_config
Configured /etc/ssh/sshd_config
Configuring example.com as NIS domain.
Client configuration complete.
The ipa-client-install command was successful


# ipa automountlocation-find
----------------------------
1 automount location matched
----------------------------
  Location: default
----------------------------
Number of entries returned 1
----------------------------

# ipa-client-automount --location=default --server=rhel8-1.example.com
IPA server: rhel8-1.example.com
Location: default
Continue to configure the system with these values? [no]: yes
Configured /etc/idmapd.conf
Restarting sssd, waiting for it to become available.
Started autofs


# file /etc/sysconfig/nfs
/etc/sysconfig/nfs: cannot open `/etc/sysconfig/nfs' (No such file or directory)


Note You need to log in before you can comment on or make changes to this bug.