RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 834064 - dnaNextValue gets incremented even if the user addition fails
Summary: dnaNextValue gets incremented even if the user addition fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Sankar Ramalingam
URL:
Whiteboard:
: 510182 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-20 18:15 UTC by Nathan Kinder
Modified: 2020-09-13 20:01 UTC (History)
4 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-02-21 08:19:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 211 0 None None None 2020-09-13 20:01:04 UTC
Red Hat Product Errata RHSA-2013:0503 0 normal SHIPPED_LIVE Moderate: 389-ds-base security, bug fix, and enhancement update 2013-02-21 08:18:44 UTC

Description Nathan Kinder 2012-06-20 18:15:19 UTC
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 04:42:56 UTC
*** Bug 510182 has been marked as a duplicate of this bug. ***

Comment 2 RHEL Program Management 2012-07-10 06:17:15 UTC
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 Program Management 2012-07-10 23:02:21 UTC
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 Severance 2012-08-14 13:08:57 UTC
test coverage :: bug834064_1 bug834064_2 bug834064_3 in dna/dnarun.sh

Comment 6 Ján Rusnačko 2012-11-12 17:14:47 UTC
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 08:19:43 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.

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.