Bug 1401904

Summary: ns-activate.pl script doesn't return error 100 for already activated users
Product: Red Hat Enterprise Linux 7 Reporter: Sankar Ramalingam <sramling>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED WONTFIX QA Contact: Viktor Ashirov <vashirov>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: nkinder, rmeggins
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-15 16:48:01 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:

Description Sankar Ramalingam 2016-12-06 11:32:22 UTC
Description of problem: ns-activate.pl script returns error 0 for already activated users. Its expected to return error 100 for users already activated by ns-activate.pl scripts. Acceptance test reports failure from accPolicy test suites.


Version-Release number of selected component (if applicable): 389-ds-base-1.3.5.10-12


How reproducible: Consistently


Steps to Reproduce:
1. Install 389-ds-base-1.3.5.10-11/12 on RHEL-7.3
2. Create an instance and add few users
3. Run ns-activate.pl script to activate users
4. Its expected to return error 100, if its executed against the already activated users.

Actual results: It returns error 0.

[root@vm-idm-029 ~]# PORT=1121; USER="uid=ttestusr3,ou=people,dc=testmmr,dc=com"; ns-inactivate.pl -D "cn=Directory Manager" -w Secret123 -h localhost -p $PORT  -Z Inst1 -I $USER ; echo $?
uid=ttestusr3,ou=people,dc=testmmr,dc=com inactivated.
0
[root@vm-idm-029 ~]# PORT=1121; USER="uid=ttestusr3,ou=people,dc=testmmr,dc=com"; ns-inactivate.pl -D "cn=Directory Manager" -w Secret123 -h localhost -p $PORT  -Z Inst1 -I $USER ; echo $?
uid=ttestusr3,ou=people,dc=testmmr,dc=com already inactivated.
100

[root@vm-idm-029 ~]# PORT=1121; USER="uid=ttestusr3,ou=people,dc=testmmr,dc=com"; ns-activate.pl -D "cn=Directory Manager" -w Secret123 -h localhost -p $PORT  -Z Inst1 -I $USER ; echo $?
uid=ttestusr3,ou=people,dc=testmmr,dc=com activated.
0
[root@vm-idm-029 ~]# PORT=1121; USER="uid=ttestusr3,ou=people,dc=testmmr,dc=com"; ns-activate.pl -D "cn=Directory Manager" -w Secret123 -h localhost -p $PORT  -Z Inst1 -I $USER ; echo $?
uid=ttestusr3,ou=people,dc=testmmr,dc=com activated.
0

Expected results: It should return error 100.


Additional info: This issue occurs only on RHEL-7.3(389-ds-base-1.3.5), not observed on RHEL-6.9(389-ds-base-1.2.11) builds.

[root@vm-idm-029 ~]# rpm -qa |grep -i 389-ds
389-ds-base-libs-1.3.5.10-12.el7_3.x86_64
389-ds-base-1.3.5.10-12.el7_3.x86_64

Comment 2 Nathan Kinder 2016-12-15 16:48:01 UTC
We should change the tests to match the current behavior.  Error 100 is a generic error, and it doesn't really provide anything useful to the end user to return this error for something that should really be treated as a no-op (and hence, not an error).  Closing this as WONTFIX.