Bug 674342 - ipactl status return code 0 on error
Summary: ipactl status return code 0 on error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: freeIPA
Classification: Retired
Component: ipa-server
Version: 2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-01 15:06 UTC by Jenny Severance
Modified: 2015-01-04 23:46 UTC (History)
5 users (show)

Fixed In Version: freeipa-2.1.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-27 07:22:22 UTC


Attachments (Terms of Use)

Description Jenny Severance 2011-02-01 15:06:50 UTC
Description of problem:
If the realm directory server instance is not running, ipactl status returns an error but return code is 0.

<snip>

# ipactl status
Directory Service: STOPPED
Error retrieving list of services {'desc': "Can't contact LDAP server"}
Is IPA installed ?
Failed to get list of services to probe status

# echo $?
0

</snip>

I do think the "Is IPA installed ?" is not necessary.  If the ipactl command exists ... I think IPA is installed.

Version-Release number of selected component (if applicable):
freeipa-server-2.0-0.2011020113git613a3d0.fc14.i686

How reproducible:
always

Steps to Reproduce:
1. service dirsrv stop relm_instance
2. ipactl status
3.
  
Actual results:
return code 0


Expected results:
non zero return code and no "Is IPA installed ?" message.

Additional info:

Comment 1 Dmitri Pal 2011-02-01 15:46:24 UTC
https://fedorahosted.org/freeipa/ticket/894

Comment 2 Martin Kosek 2011-02-11 07:27:08 UTC
Fixed in fb751686a1086734c66916ad9589d95b47af4a5d.

Comment 3 Namita Soman 2011-06-10 13:38:56 UTC
Verified using - ipa-server-2.0.0-23.el6_1.1.x86_64

Automated tests run the sequence:
service dirsrv stop testrelm
ipactl status -> returns 3 as expected
service dirsrv start testrelm


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