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 1252133 - replica upgrade failed in starting dirsrv service
Summary: replica upgrade failed in starting dirsrv service
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-10 19:10 UTC by Xiyang Dong
Modified: 2020-09-13 21:29 UTC (History)
13 users (show)

Fixed In Version: 389-ds-base-1.3.4.0-12.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 11:43:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 1574 0 None closed replica upgrade failed in starting dirsrv service due to upgrade scripts did not run 2020-09-20 18:05:56 UTC
Red Hat Product Errata RHBA-2015:2351 0 normal SHIPPED_LIVE 389-ds-base bug fix and enhancement update 2015-11-19 10:28:44 UTC

Description Xiyang Dong 2015-08-10 19:10:45 UTC
Description of problem:
ipa replica upgrade failed in starting dirsrv

Version-Release number of selected component (if applicable):
ipa-server-4.1.0-18.el7.x86_64 
ipa-server-4.2.0-3.el7.x86_64
389-ds-base-1.3.3.1-13.el7.x86_64
389-ds-base-1.3.4.0-9.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Upgrade 7.1 master to 7.2
2.Upgrade 7.1 replica to 7.2
3.Upgrade fails on replica

Actual results:
ipa replica upgrade failed
Expected results:
Upgrade successfully

Additional info:
:: [  BEGIN   ] :: Running 'yum -y update 'ipa*' sssd'
.
.
.
2015-08-10T14:26:53Z DEBUG Upgrading IPA:
2015-08-10T14:26:53Z DEBUG   [1/10]: stopping directory server
2015-08-10T14:26:53Z DEBUG Starting external process
2015-08-10T14:26:53Z DEBUG args='/bin/systemctl' 'stop' 'dirsrv'
2015-08-10T14:26:56Z DEBUG Process finished, return code=0
2015-08-10T14:26:56Z DEBUG stdout=
2015-08-10T14:26:56Z DEBUG stderr=
2015-08-10T14:26:56Z DEBUG   duration: 3 seconds
2015-08-10T14:26:56Z DEBUG   [2/10]: saving configuration
2015-08-10T14:26:56Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2015-08-10T14:26:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2015-08-10T14:26:56Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2015-08-10T14:26:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2015-08-10T14:26:56Z DEBUG   duration: 0 seconds
2015-08-10T14:26:56Z DEBUG   [3/10]: disabling listeners
2015-08-10T14:26:56Z DEBUG   duration: 0 seconds
2015-08-10T14:26:56Z DEBUG   [4/10]: enabling DS global lock
2015-08-10T14:26:56Z DEBUG   duration: 0 seconds
2015-08-10T14:26:56Z DEBUG   [5/10]: starting directory server
2015-08-10T14:26:56Z DEBUG Starting external process
2015-08-10T14:26:56Z DEBUG args='/bin/systemctl' 'start' 'dirsrv'
2015-08-10T14:26:56Z DEBUG Process finished, return code=1
2015-08-10T14:26:56Z DEBUG stdout=
2015-08-10T14:26:56Z DEBUG stderr=Job for dirsrv failed because the control process exited with error code. See "systemctl status dirsrv" and "journalctl -xe" for details.
2015-08-10T14:26:56Z DEBUG Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 416, in start_creation
    run_step(full_msg, method)
  File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 406, in run_step
    method()
  File "/usr/lib/python2.7/site-packages/ipaserver/install/upgradeinstance.py", line 176, in __start
    services.service(self.service_name).start(self.serverid, ldapi=True)
  File "/usr/lib/python2.7/site-packages/ipaplatform/redhat/services.py", line 163, in start
    instance_name, capture_output=capture_output, wait=wait)
  File "/usr/lib/python2.7/site-packages/ipaplatform/base/services.py", line 298, in start
    capture_output=capture_output)
  File "/usr/lib/python2.7/site-packages/ipapython/ipautil.py", line 373, in run
    raise CalledProcessError(p.returncode, arg_string, stdout)
CalledProcessError: Command ''/bin/systemctl' 'start' 'dirsrv'' returned non-zero exit status 1

2015-08-10T14:26:56Z DEBUG   [error] CalledProcessError: Command ''/bin/systemctl' 'start' 'dirsrv'' returned non-zero exit status 1
2015-08-10T14:26:56Z DEBUG   [cleanup]: stopping directory server
2015-08-10T14:26:56Z DEBUG Starting external process
2015-08-10T14:26:56Z DEBUG args='/bin/systemctl' 'stop' 'dirsrv'
2015-08-10T14:26:56Z DEBUG Process finished, return code=0
2015-08-10T14:26:56Z DEBUG stdout=
2015-08-10T14:26:56Z DEBUG stderr=
2015-08-10T14:26:56Z DEBUG   duration: 0 seconds
2015-08-10T14:26:56Z DEBUG   [cleanup]: restoring configuration
2015-08-10T14:26:56Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2015-08-10T14:26:56Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2015-08-10T14:26:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2015-08-10T14:26:56Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2015-08-10T14:26:56Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2015-08-10T14:26:56Z DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
2015-08-10T14:26:56Z DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state'
2015-08-10T14:26:56Z DEBUG   duration: 0 seconds
2015-08-10T14:26:56Z ERROR IPA server upgrade failed: Inspect /var/log/ipaupgrade.log and run command ipa-server-upgrade manually.
2015-08-10T14:26:56Z DEBUG   File "/usr/lib/python2.7/site-packages/ipapython/admintool.py", line 171, in execute
    return_value = self.run()
  File "/usr/lib/python2.7/site-packages/ipaserver/install/ipa_server_upgrade.py", line 48, in run
    server.upgrade()
  File "/usr/lib/python2.7/site-packages/ipaserver/install/server/upgrade.py", line 1563, in upgrade
    data_upgrade.create_instance()
  File "/usr/lib/python2.7/site-packages/ipaserver/install/upgradeinstance.py", line 201, in create_instance
    show_service_name=False)
  File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 416, in start_creation
    run_step(full_msg, method)
  File "/usr/lib/python2.7/site-packages/ipaserver/install/service.py", line 406, in run_step
    method()
  File "/usr/lib/python2.7/site-packages/ipaserver/install/upgradeinstance.py", line 176, in __start
    services.service(self.service_name).start(self.serverid, ldapi=True)
  File "/usr/lib/python2.7/site-packages/ipaplatform/redhat/services.py", line 163, in start
    instance_name, capture_output=capture_output, wait=wait)
  File "/usr/lib/python2.7/site-packages/ipaplatform/base/services.py", line 298, in start
    capture_output=capture_output)
  File "/usr/lib/python2.7/site-packages/ipapython/ipautil.py", line 373, in run
    raise CalledProcessError(p.returncode, arg_string, stdout)

2015-08-10T14:26:56Z DEBUG The ipa-server-upgrade command failed, exception: CalledProcessError: Command ''/bin/systemctl' 'start' 'dirsrv'' returned non-zero exit status 1
2015-08-10T14:26:56Z ERROR Unexpected error - see /var/log/ipaupgrade.log for details:
CalledProcessError: Command ''/bin/systemctl' 'start' 'dirsrv'' returned non-zero exit status 1

Comment 7 Petr Vobornik 2015-08-11 13:37:34 UTC
changing component according to comment 6

Comment 8 Noriko Hosoi 2015-08-11 15:46:39 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/48243

Comment 22 Noriko Hosoi 2015-08-18 22:10:53 UTC
Steps to verify with standalone 389-ds-base.

1. install older version of 389-ds-base (newer than 1.3.1)
2. systemctl disable dirsrv@SERVER_ID
   check there is no dirsrv@SERVER_ID in /etc/systemd/system/dirsrv.target.wants.
3. check ns-slapd is up (record PID)
4. set environment variables for debug logging
   export DEBUGPOSTTRANS=/tmp/output
   export DEBUGPOSTSETUP=-ddddd 
5. run upgrade to 389-ds-base-1.3.4.0-12 (e.g., rpm -U 389-ds-base)
6. check /tmp/output and /tmp/output.upgrade that the upgrade had run.
7. check ns-slapd is up and the PID is different from the one from step 3.
8. check the server instance service remains disabled.
   "systemctl status dirsrv@SERVER_ID" does not report enabled.
   There is no dirsrv@SERVER_ID in /etc/systemd/system/dirsrv.target.wants.

If 6, 7, and 8 are satisfied, the fix is verified.

Comment 23 Viktor Ashirov 2015-08-19 08:41:27 UTC
[1] I've installed 389-ds-base-1.3.4.0-8.el7.x86_64
# rpm -q 389-ds-base
389-ds-base-1.3.4.0-8.el7.x86_64

[2] Disabled dirsrv service:
# systemctl disable dirsrv@rhel7ds
Removed symlink /etc/systemd/system/dirsrv.target.wants/dirsrv.
# ls /etc/systemd/system/dirsrv.target.wants/ | wc -l
0

[3] check ns-slapd is up (record PID)
# pgrep ns-slapd
31428

[4] set environment variables for debug logging
# export DEBUGPOSTTRANS=/tmp/output
# export DEBUGPOSTSETUP=-ddddd 

[5] run upgrade to 389-ds-base-1.3.4.0-12 (e.g., rpm -U 389-ds-base)
# rpm -U 389-ds-base*

[6] check /tmp/output and /tmp/output.upgrade that the upgrade had run.

# ls /tmp/output* -la
-rw-r--r--. 1 root root 45583 Aug 19 10:31 /tmp/output
-rw-r--r--. 1 root root 43735 Aug 19 10:31 /tmp/output.upgrade

[7] check ns-slapd is up and the PID is different from the one from step 3.
# pgrep ns-slapd
31660

[8] check the server instance service remains disabled.
# systemctl status dirsrv@rhel7ds
● dirsrv - 389 Directory Server rhel7ds.
   Loaded: loaded (/usr/lib/systemd/system/dirsrv@.service; static; vendor preset: disabled)
   Active: active (running) since Wed 2015-08-19 10:31:58 CEST; 1min 7s ago
  Process: 31659 ExecStart=/usr/sbin/ns-slapd -D /etc/dirsrv/slapd-%i -i /var/run/dirsrv/slapd-%i.pid -w /var/run/dirsrv/slapd-%i.startpid (code=exited, status=0/SUCCESS)
 Main PID: 31660 (ns-slapd)
   CGroup: /system.slice/system-dirsrv.slice/dirsrv
           └─31660 /usr/sbin/ns-slapd -D /etc/dirsrv/slapd-rhel7ds -i /var/run/dirsrv/slapd-rhel7ds.pid -w /var/run/dirsrv/slapd-rhel7ds.startpid

# ls /etc/systemd/system/dirsrv.target.wants/ | wc -l
0

Marking as VERIFIED.

Comment 26 errata-xmlrpc 2015-11-19 11:43:59 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://rhn.redhat.com/errata/RHBA-2015-2351.html


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