Bug 1696963 - Failed to install replica
Summary: Failed to install replica
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: freeipa
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: IPA Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-06 17:12 UTC by Lukas Slebodnik
Modified: 2019-04-11 02:14 UTC (History)
9 users (show)

Fixed In Version: freeipa-4.7.2-8 freeipa-4.7.2-8.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-11 02:14:05 UTC
Type: Bug


Attachments (Terms of Use)

Description Lukas Slebodnik 2019-04-06 17:12:04 UTC
Description of problem:
It is not possible to install replica with the latest upgrade of freeipa

Version-Release number of selected component (if applicable):
freeipa-server-4.7.2-7.fc31.x86_64

How reproducible:
Deterministic

Actual results:
/usr/sbin/ipa-replica-install -U --setup-ca --setup-dns -P admin -w Secret123'
Configuring client side components
Discovery was successful!
Client hostname: hp-dl.testrelm.test
Realm: TESTRELM.TEST
DNS Domain: testrelm.test
IPA Server: hp-z2.testrelm.test
BaseDN: dc=testrelm,dc=test
Synchronizing time
No SRV records of NTP servers found and no NTP server or pool address was provided.
Attempting to sync time with chronyc.
Time synchronization was successful.
Successfully retrieved CA cert
    Subject:     CN=Certificate Authority,O=TESTRELM.TEST
    Issuer:      CN=Certificate Authority,O=TESTRELM.TEST
    Valid From:  2019-04-06 16:37:24
    Valid Until: 2039-04-06 16:37:24

Enrolled in IPA realm TESTRELM.TEST
Created /etc/ipa/default.conf
Configured sudoers in /etc/nsswitch.conf
Configured /etc/sssd/sssd.conf
Configured /etc/krb5.conf for IPA realm TESTRELM.TEST
Systemwide CA database updated.
Hostname (hp-dl.testrelm.test) does not have A/AAAA record.
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 testrelm.test as NIS domain.
Client configuration complete.
The ipa-client-install command was successful
This program will set up FreeIPA client.
Version 4.7.2


Using default chrony configuration.


Checking DNS forwarders, please wait ...
Run connection check to master
Connection check OK
Configuring directory server (dirsrv). Estimated time: 30 seconds
  [1/41]: creating directory server instance
  [2/41]: enabling ldapi
  [3/41]: configure autobind for root
  [4/41]: stopping directory server
  [5/41]: updating configuration in dse.ldif
  [6/41]: starting directory server
  [7/41]: adding default schema
  [8/41]: enabling memberof plugin
  [9/41]: enabling winsync plugin
  [10/41]: configuring replication version plugin
  [11/41]: enabling IPA enrollment plugin
  [12/41]: configuring uniqueness plugin
  [13/41]: configuring uuid plugin
  [14/41]: configuring modrdn plugin
  [15/41]: configuring DNS plugin
  [16/41]: enabling entryUSN plugin
  [17/41]: configuring lockout plugin
  [18/41]: configuring topology plugin
  [19/41]: creating indices
  [20/41]: enabling referential integrity plugin
  [21/41]: configuring certmap.conf
  [22/41]: configure new location for managed entries
  [23/41]: configure dirsrv ccache and keytab
  [24/41]: enabling SASL mapping fallback
  [25/41]: restarting directory server
  [26/41]: creating DS keytab
  [error] FileNotFoundError: [Errno 2] No such file or directory: '/etc/sysconfig/dirsrv'
[Errno 2] No such file or directory: '/etc/sysconfig/dirsrv'
The ipa-replica-install command failed. See /var/log/ipareplica-install.log for more information
Your system may be partly configured.
Run /usr/sbin/ipa-server-install --uninstall to clean up.

Expected results:
Replica installed without any problem

Additional info:

Part of ipareplica-install.log
2019-04-06T16:51:04Z DEBUG   [25/41]: restarting directory server
2019-04-06T16:51:04Z DEBUG Destroyed connection context.ldap2_140363832275968
2019-04-06T16:51:04Z DEBUG Starting external process
2019-04-06T16:51:04Z DEBUG args=['/bin/systemctl', '--system', 'daemon-reload']
2019-04-06T16:51:05Z DEBUG Process finished, return code=0
2019-04-06T16:51:05Z DEBUG stdout=
2019-04-06T16:51:05Z DEBUG stderr=
2019-04-06T16:51:05Z DEBUG Starting external process
2019-04-06T16:51:05Z DEBUG args=['/bin/systemctl', 'restart', 'dirsrv@TESTRELM-TEST.service']
2019-04-06T16:51:09Z DEBUG Process finished, return code=0
2019-04-06T16:51:09Z DEBUG stdout=
2019-04-06T16:51:09Z DEBUG stderr=
2019-04-06T16:51:09Z DEBUG Starting external process
2019-04-06T16:51:09Z DEBUG args=['/bin/systemctl', 'is-active', 'dirsrv@TESTRELM-TEST.service']
2019-04-06T16:51:09Z DEBUG Process finished, return code=0
2019-04-06T16:51:09Z DEBUG stdout=active

2019-04-06T16:51:09Z DEBUG stderr=
2019-04-06T16:51:09Z DEBUG wait_for_open_ports: localhost [389] timeout 300
2019-04-06T16:51:09Z DEBUG waiting for port: 389
2019-04-06T16:51:09Z DEBUG SUCCESS: port: 389
2019-04-06T16:51:09Z DEBUG Restart of dirsrv@TESTRELM-TEST.service complete
2019-04-06T16:51:09Z DEBUG Starting external process
2019-04-06T16:51:09Z DEBUG args=['/bin/systemctl', 'is-active', 'dirsrv@TESTRELM-TEST.service']
2019-04-06T16:51:09Z DEBUG Process finished, return code=0
2019-04-06T16:51:09Z DEBUG stdout=active

2019-04-06T16:51:09Z DEBUG stderr=
2019-04-06T16:51:09Z DEBUG Created connection context.ldap2_140363832275968
2019-04-06T16:51:09Z DEBUG step duration: dirsrv __restart_instance 4.91 sec
2019-04-06T16:51:09Z DEBUG   [26/41]: creating DS keytab
2019-04-06T16:51:09Z DEBUG raw: service_add('ldap/hp-dl.testrelm.test@TESTRELM.TEST', force=True, version='2.230')
2019-04-06T16:51:09Z DEBUG service_add(ipapython.kerberos.Principal('ldap/hp-dl.testrelm.test@TESTRELM.TEST'), force=True, skip_host_check=False, all=False, raw=False, version='2.230', no_members=False)
2019-04-06T16:51:09Z DEBUG raw: host_show('hp-dl.testrelm.test', version='2.230')
2019-04-06T16:51:09Z DEBUG host_show('hp-dl.testrelm.test', rights=False, all=False, raw=False, version='2.230', no_members=False)
2019-04-06T16:51:09Z DEBUG Backing up system configuration file '/etc/dirsrv/ds.keytab'
2019-04-06T16:51:09Z DEBUG   -> Not backing up - '/etc/dirsrv/ds.keytab' doesn't exist
2019-04-06T16:51:09Z DEBUG Starting external process
2019-04-06T16:51:09Z DEBUG args=['/usr/sbin/ipa-getkeytab', '-k', '/etc/dirsrv/ds.keytab', '-p', 'ldap/hp-dl.testrelm.test@TESTRELM.TEST', '-H', 'ldaps://hp-z200-07.testrelm.test']
2019-04-06T16:51:10Z DEBUG Process finished, return code=0
2019-04-06T16:51:10Z DEBUG stdout=
2019-04-06T16:51:10Z DEBUG stderr=Keytab successfully retrieved and stored in: /etc/dirsrv/ds.keytab

2019-04-06T16:51:10Z DEBUG Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/ipaserver/install/service.py", line 605, in start_creation
    run_step(full_msg, method)
  File "/usr/lib/python3.7/site-packages/ipaserver/install/service.py", line 591, in run_step
    method()
  File "/usr/lib/python3.7/site-packages/ipaserver/install/dsinstance.py", line 1349, in request_service_keytab
    replacevars=vardict)
  File "/usr/lib/python3.7/site-packages/ipapython/ipautil.py", line 1136, in config_replace_variables
    orig_stat = os.stat(filepath)
FileNotFoundError: [Errno 2] No such file or directory: '/etc/sysconfig/dirsrv'

2019-04-06T16:51:10Z DEBUG   [error] FileNotFoundError: [Errno 2] No such file or directory: '/etc/sysconfig/dirsrv'
2019-04-06T16:51:10Z DEBUG Destroyed connection context.ldap2_140363821819216
2019-04-06T16:51:10Z DEBUG Backing up system configuration file '/etc/ipa/default.conf'
2019-04-06T16:51:10Z DEBUG Saving Index File to '/var/lib/ipa/sysrestore/sysrestore.index'
2019-04-06T16:51:10Z DEBUG Writing configuration file /etc/ipa/default.conf
2019-04-06T16:51:10Z DEBUG [global]
basedn = dc=testrelm,dc=test
host = hp-dl.testrelm.test
realm = TESTRELM.TEST
domain = testrelm.test
xmlrpc_uri = https://hp-dl.testrelm.test/ipa/xml
ldap_uri = ldapi://%2fvar%2frun%2fslapd-TESTRELM-TEST.socket

mode = production
enable_ra = True
ra_plugin = dogtag
dogtag_version = 10



2019-04-06T16:51:10Z DEBUG   File "/usr/lib/python3.7/site-packages/ipapython/admintool.py", line 179, in execute
    return_value = self.run()
  File "/usr/lib/python3.7/site-packages/ipapython/install/cli.py", line 347, in run
    return cfgr.run()
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 360, in run
    return self.execute()
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 386, in execute
    for rval in self._executor():
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 431, in __runner
    exc_handler(exc_info)
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 460, in _handle_execute_exception
    self._handle_exception(exc_info)
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 450, in _handle_exception
    six.reraise(*exc_info)
  File "/usr/lib/python3.7/site-packages/six.py", line 693, in reraise
    raise value
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 421, in __runner
    step()
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 418, in <lambda>
    step = lambda: next(self.__gen)
  File "/usr/lib/python3.7/site-packages/ipapython/install/util.py", line 81, in run_generator_with_yield_from
    six.reraise(*exc_info)
  File "/usr/lib/python3.7/site-packages/six.py", line 693, in reraise
    raise value
  File "/usr/lib/python3.7/site-packages/ipapython/install/util.py", line 59, in run_generator_with_yield_from
    value = gen.send(prev_value)
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 655, in _configure
    next(executor)
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 431, in __runner
    exc_handler(exc_info)
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 460, in _handle_execute_exception
    self._handle_exception(exc_info)
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 518, in _handle_exception
    self.__parent._handle_exception(exc_info)
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 450, in _handle_exception
    six.reraise(*exc_info)
  File "/usr/lib/python3.7/site-packages/six.py", line 693, in reraise
    raise value
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 515, in _handle_exception
    super(ComponentBase, self)._handle_exception(exc_info)
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 450, in _handle_exception
    six.reraise(*exc_info)
  File "/usr/lib/python3.7/site-packages/six.py", line 693, in reraise
    raise value
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 421, in __runner
    step()
  File "/usr/lib/python3.7/site-packages/ipapython/install/core.py", line 418, in <lambda>
    step = lambda: next(self.__gen)
  File "/usr/lib/python3.7/site-packages/ipapython/install/util.py", line 81, in run_generator_with_yield_from
    six.reraise(*exc_info)
  File "/usr/lib/python3.7/site-packages/six.py", line 693, in reraise
    raise value
  File "/usr/lib/python3.7/site-packages/ipapython/install/util.py", line 59, in run_generator_with_yield_from
    value = gen.send(prev_value)
  File "/usr/lib/python3.7/site-packages/ipapython/install/common.py", line 65, in _install
    for unused in self._installer(self.parent):
  File "/usr/lib/python3.7/site-packages/ipaserver/install/server/__init__.py", line 583, in main
    replica_install(self)
  File "/usr/lib/python3.7/site-packages/ipaserver/install/server/replicainstall.py", line 400, in decorated
    func(installer)
  File "/usr/lib/python3.7/site-packages/ipaserver/install/server/replicainstall.py", line 1188, in install
    fstore=fstore)
  File "/usr/lib/python3.7/site-packages/ipaserver/install/server/replicainstall.py", line 111, in install_replica_ds
    setup_pkinit=not options.no_pkinit,
  File "/usr/lib/python3.7/site-packages/ipaserver/install/dsinstance.py", line 420, in create_replica
    self.start_creation(runtime=30)
  File "/usr/lib/python3.7/site-packages/ipaserver/install/service.py", line 605, in start_creation
    run_step(full_msg, method)
  File "/usr/lib/python3.7/site-packages/ipaserver/install/service.py", line 591, in run_step
    method()
  File "/usr/lib/python3.7/site-packages/ipaserver/install/dsinstance.py", line 1349, in request_service_keytab
    replacevars=vardict)
  File "/usr/lib/python3.7/site-packages/ipapython/ipautil.py", line 1136, in config_replace_variables
    orig_stat = os.stat(filepath)

2019-04-06T16:51:10Z DEBUG The ipa-replica-install command failed, exception: FileNotFoundError: [Errno 2] No such file or directory: '/etc/sysconfig/dirsrv'
2019-04-06T16:51:10Z ERROR [Errno 2] No such file or directory: '/etc/sysconfig/dirsrv'
2019-04-06T16:51:10Z ERROR The ipa-replica-install command failed. See /var/log/ipareplica-install.log for more information

Comment 1 Alexander Bokovoy 2019-04-06 20:03:09 UTC
Thanks for checking it, Lukas. I submitted https://github.com/freeipa/freeipa/pull/2999 upstream -- the original patchset didn't fail as PR CI tests against older 389-ds-base which still provided /etc/sysconfig/dirsrv*.

Comment 2 Fedora Update System 2019-04-06 20:48:28 UTC
freeipa-4.7.2-8.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-540b1780f5

Comment 3 Fedora Update System 2019-04-07 02:44:36 UTC
freeipa-4.7.2-8.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-540b1780f5

Comment 4 Fedora Update System 2019-04-11 02:14:05 UTC
freeipa-4.7.2-8.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


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