Red Hat Bugzilla – Bug 834064
dnaNextValue gets incremented even if the user addition fails
Last modified: 2013-02-21 03:19:43 EST
This bug is created as a clone of upstream ticket: https://fedorahosted.org/389/ticket/211 https://bugzilla.redhat.com/show_bug.cgi?id=510182 {{{ Description of problem: The setup is a single instance DNA plugin enabled. The dnaNextValue counter gets incremented even if there is a failure in addition of the user. Therefore creating gaps in number assignment and resulting in non utilization of a valid number in range. Version-Release number of selected component (if applicable): RHDS 9.0 How reproducible: Everytime Steps to Reproduce: 1. Enable DNA Plugin 2. Add the entry below, to enable DNA for uidNumber attribute. dn: cn=Account UIDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config objectClass: top objectClass: extensibleObject cn: Account UIDs dnatype: uidNumber dnafilter: (objectclass=posixAccount) dnascope: dc=pnq,dc=redhat,dc=com dnanextvalue: 1 dnamaxvalue: 1300 3. Restart server. 4. Add a user and see if the DNA plugin is working as expected and the dnaNextValue number get incremented. (This is happening correctly). 5. Add a user without gidNumber attribute, which will fail as DNA is not enabled for gidNumber in this setup. 6. Check dnaNextValue. It would have got incremented even though the user addition is failed. Actual results: dnaNextValue get incremented even if the user addition fails. Expected results: dnaNextValue should not get incremented if the user addition fails. Additional info: }}}
*** Bug 510182 has been marked as a duplicate of this bug. ***
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
test coverage :: bug834064_1 bug834064_2 bug834064_3 in dna/dnarun.sh
520|0 4 27814 1 2|----------------- Starting Test bug834064_2 ------------------------- 520|0 4 27814 1 3|DNA SCENARIO BUG 834064: dnaNextValue gets incremented even if the user addition fails 520|0 4 27814 1 4| 520|0 4 27814 1 5|Adding user 1 with GID - running /usr/lib64/mozldap/ldapmodify -h dstet.example.com -p 27557 -D cn=directory manager -w Secret123 -a -f /dstet/dstet-trunk/tet/../data/DS/6.0/dna/en/bug834064_data/add1.ldif 520|0 4 27814 1 6|TestCase [bug834064_2] result-> [PASS] 520|0 4 27814 1 7| 520|0 4 27814 1 8|Verify user 1 uidNumber 520|0 4 27814 1 9|TestCase [bug834064_2] result-> [PASS] 520|0 4 27814 1 10| 520|0 4 27814 1 11|Verify that DNA attribute dnaNextValue incremented 520|0 4 27814 1 12|cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config, dnanextvalue, 27557, 2 520|0 4 27814 1 13|/usr/lib64/mozldap/ldapsearch -1 -h dstet.example.com -p 27557 -D "cn=directory manager" -w Secret123 -b "cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config" "(objectclass=*)" 520|0 4 27814 1 14|DNA attribute dnanextvalue is as expected: 2 520|0 4 27814 1 15|TestCase [bug834064_2] result-> [PASS] 520|0 4 27814 1 16| 520|0 4 27814 1 17|Adding user 2 without GID - running /usr/lib64/mozldap/ldapmodify -h dstet.example.com -p 27557 -D cn=directory manager -w Secret123 -a -f /dstet/dstet-trunk/tet/../data/DS/6.0/dna/en/bug834064_data/add2.ldif 520|0 4 27814 1 18|TestCase [bug834064_2] result-> [PASS] 520|0 4 27814 1 19| 520|0 4 27814 1 20|Verify that DNA next value did not increment upon unsuccessful addition of user 2 520|0 4 27814 1 21|cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config, dnanextvalue, 27557, 2 520|0 4 27814 1 22|/usr/lib64/mozldap/ldapsearch -1 -h dstet.example.com -p 27557 -D "cn=directory manager" -w Secret123 -b "cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config" "(objectclass=*)" 520|0 4 27814 1 23|DNA attribute dnanextvalue is as expected: 2 520|0 4 27814 1 24|TestCase [bug834064_2] result-> [PASS] version: 389-ds-base-1.2.11.15-3.el6.x86_64 Closing as verified.
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. http://rhn.redhat.com/errata/RHSA-2013-0503.html