Bug 834064 - dnaNextValue gets incremented even if the user addition fails
dnaNextValue gets incremented even if the user addition fails
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
6.4
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Rich Megginson
Sankar Ramalingam
:
: 510182 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-20 14:15 EDT by Nathan Kinder
Modified: 2013-02-21 03:19 EST (History)
4 users (show)

See Also:
Fixed In Version: 389-ds-base-1.2.11.12-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: we incremented the count in the pre opstage Consequence: If the update failed, the counter was still incremented. Fix: If the operation fails, undo the changes in the be txn pre op. Result: dna counter is not incremented.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:19:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nathan Kinder 2012-06-20 14:15:19 EDT
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:
}}}
Comment 1 Nathan Kinder 2012-06-21 00:42:56 EDT
*** Bug 510182 has been marked as a duplicate of this bug. ***
Comment 2 RHEL Product and Program Management 2012-07-10 02:17:15 EDT
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.
Comment 3 RHEL Product and Program Management 2012-07-10 19:02:21 EDT
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.
Comment 4 Jenny Galipeau 2012-08-14 09:08:57 EDT
test coverage :: bug834064_1 bug834064_2 bug834064_3 in dna/dnarun.sh
Comment 6 Ján Rusnačko 2012-11-12 12:14:47 EST
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.
Comment 7 errata-xmlrpc 2013-02-21 03:19:43 EST
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

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