Bug 1033357

Summary: ipactl can not restart ipa services if current status is "stopped"
Product: Red Hat Enterprise Linux 7 Reporter: Yi Zhang <yzhang>
Component: ipaAssignee: Martin Kosek <mkosek>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.0CC: apetrova, dpal, pondrejk, pviktori, rcritten, xdong
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-4.0.3-1.el7 Doc Type: Known Issue
Doc Text:
The "ipactl restart" command requires the Directory Server (DS) service to be running. Consequently, "ipactl restart" fails with an error message when this condition is not met. To work around this problem, use the "ipactl start" command to start DS before executing "ipactl restart". Note that you can use the "ipactl status" command to verify if DS is running.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:10:04 UTC 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: 1168850    

Description Yi Zhang 2013-11-21 23:01:11 UTC
Description of problem:

Simple put: ipactl restart does not work if current ipa server status is "stop".
The following message will print:
Failed to read data from Directory Service: Failed to get list of services to
probe status:
Directory Server is stopped
Shutting down


test shows:
1. if ipa server is running currently, "ipactl restart" will success
2. if ipa server is stopped currently, "ipactl restart" will fail, however,
"ipactl start" will success


My test is here:
[root@rh7a (RH7.0-x86_64) ipa-autorenewcert] ipactl status
Directory Service: STOPPED
Directory Service must be running in order to obtain status of other services
ipa: INFO: The ipactl command was successful
[root@rh7a (RH7.0-x86_64) ipa-autorenewcert] ipactl start
Existing service file detected!
Assuming stale, cleaning and proceeding
Starting Directory Service
Starting krb5kdc Service
Starting kadmin Service
Starting named Service
Starting ipa_memcached Service
Starting httpd Service
Starting pki-tomcatd Service
Starting ipa-otpd Service
ipa: INFO: The ipactl command was successful
[root@rh7a (RH7.0-x86_64) ipa-autorenewcert] ipactl restart
Restarting Directory Service
Restarting krb5kdc Service
Restarting kadmin Service
Restarting named Service
Restarting ipa_memcached Service
Restarting httpd Service
Restarting pki-tomcatd Service
Restarting ipa-otpd Service
ipa: INFO: The ipactl command was successful
[root@rh7a (RH7.0-x86_64) ipa-autorenewcert] ipactl stop
Stopping Directory Service
Stopping ipa-otpd Service
Stopping pki-tomcatd Service
Stopping httpd Service
Stopping ipa_memcached Service
Stopping named Service
Stopping kadmin Service
Stopping krb5kdc Service
ipa: INFO: The ipactl command was successful
[root@rh7a (RH7.0-x86_64) ipa-autorenewcert] ipactl restart
Failed to read data from Directory Service: Failed to get list of services to
probe status:
Directory Server is stopped
Shutting down
[root@rh7a (RH7.0-x86_64) ipa-autorenewcert] ipactl start
Existing service file detected!
Assuming stale, cleaning and proceeding
Starting Directory Service
Starting krb5kdc Service
Starting kadmin Service
Starting named Service
Starting ipa_memcached Service
Starting httpd Service
Starting pki-tomcatd Service
Starting ipa-otpd Service
ipa: INFO: The ipactl command was successful


Version-Release number of selected component (if applicable):
ipa-server-3.3.3-3.el7.x86_64


How reproducible: always




Additional info: No special error message found in dirsrv log file

Comment 2 Martin Kosek 2013-11-22 09:16:58 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/4050

Comment 4 Martin Kosek 2014-02-19 16:49:58 UTC
Fixed upstream
master:
https://fedorahosted.org/freeipa/changeset/a1459e38e7e88a0ba7b96ee7a1bf463583654063

Comment 7 Martin Kosek 2014-12-03 15:52:43 UTC
Note that this issue is only valid for RHEL-7.0, it is about to be fixed in RHEL-7.0 so the Known Issue should be omitted from 7.1 release notes.

Comment 8 Xiyang Dong 2015-01-05 20:38:37 UTC
Verified on ipa-server-4.1.0-13.el7.x86_64:

[root@hp-dl380pgen8-01 ~]# ipactl stop
Stopping ipa-otpd Service
Stopping pki-tomcatd Service
Stopping httpd Service
Stopping ipa_memcached Service
Stopping named Service
Stopping kadmin Service
Stopping krb5kdc Service
Stopping Directory Service
ipa: INFO: The ipactl command was successful
[root@hp-dl380pgen8-01 ~]# ipactl status
Directory Service: STOPPED
Directory Service must be running in order to obtain status of other services
ipa: INFO: The ipactl command was successful
[root@hp-dl380pgen8-01 ~]# ipactl restart
Starting Directory Service
Starting krb5kdc Service
Starting kadmin Service
Starting named Service
Starting ipa_memcached Service
Starting httpd Service
Starting pki-tomcatd Service
Starting ipa-otpd Service
ipa: INFO: The ipactl command was successful
[root@hp-dl380pgen8-01 ~]# ipactl status
Directory Service: RUNNING
krb5kdc Service: RUNNING
kadmin Service: RUNNING
named Service: RUNNING
ipa_memcached Service: RUNNING
httpd Service: RUNNING
pki-tomcatd Service: RUNNING
ipa-otpd Service: RUNNING
ipa: INFO: The ipactl command was successful

Comment 10 errata-xmlrpc 2015-03-05 10:10:04 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/RHSA-2015-0442.html