RID numbers increase too quickly?

CS cove_s at yahoo.com
Wed Jun 19 19:39:09 MDT 2013


Filed a bug for this:
https://bugzilla.samba.org/show_bug.cgi?id=9960


Thx!



________________________________
 From: CS <cove_s at yahoo.com>
To: CS <cove_s at yahoo.com>; "samba-technical at lists.samba.org" <samba-technical at lists.samba.org> 
Sent: Wednesday, June 19, 2013 11:23 AM
Subject: Re: RID numbers increase too quickly?
 


Minor patch correction for clarity (previous one was backwards):

--- source4/dsdb/samdb/ldb_modules/ridalloc.c.orig2013-06-19 11:20:25.000000000 -0700
+++ source4/dsdb/samdb/ldb_modules/ridalloc.c2013-06-19 11:21:12.000000000 -0700
@@ -605,7 +605,8 @@
 /*
  * if we are half-exhausted then try to get a new pool.
  */
-if (nridset.next_rid > (prev_pool_hi + prev_pool_lo)/2) {
+if (nridset.next_rid > (prev_pool_hi + prev_pool_lo)/2 &&
+nridset.alloc_pool == nridset.prev_pool) {
 /*
  * if we are the RID Manager,
  * we can get a new pool localy.


________________________________
 From: CS <cove_s at yahoo.com>
To: Cove Schneider <cove_s at yahoo.com>; "samba-technical at lists.samba.org" <samba-technical at lists.samba.org> 
Sent: Wednesday, June 19, 2013 10:01 AM
Subject: Re: RID numbers increase too quickly?
 


Hi folks,

As best as I can tell, it looks like the cause of the RIDs increasing so quickly is due to a new pool request being made when the RIDs of the current pool are half used up and a check to see if a new pool was already allocated is missing. So when the RID is between 251-500 in a pool, every time a new RID is requested a new pool is also requested.

I believe something like this resolves it, but would need to defer to someone more knowledgeable:
--- ridalloc.c2013-06-19 09:41:13.000000000 -0700
+++ ridalloc.c.orig2013-06-19 09:39:44.000000000 -0700
@@ -606,8 +606,7 @@
 /*
  * if we are half-exhausted then try to get a new pool.
  */
-if (nridset.next_rid > (prev_pool_hi + prev_pool_lo)/2 &&
-nridset.alloc_pool == nridset.prev_pool) {
+if (nridset.next_rid > (prev_pool_hi + prev_pool_lo)/2) {
 /*
  * if we are the RID Manager,
  * we can get a new pool localy.

Any help appreciated.

Thanks,

cs



________________________________
 From: Cove Schneider <cove_s at yahoo.com>
To: "samba-technical at lists.samba.org" <samba-technical at lists.samba.org> 
Sent: Tuesday, June 18, 2013 7:09 PM
Subject: RID numbers increase too quickly?
 

Hi folks,

I noticed that the RID numbers seem to increase incrementally, then will suddenly jump by 124501. Unless I'm misunderstanding, shouldn't RID pool allocations just be 500 at a time?
 
e.g.  Adding accounts one after another on a single test instance here's how they're incrementing (from 4.0.6):
1596
1597
1598
1599
126100
126101
126102
...
126599

251100
...

251599

376100
...

The problem is that this complicates using sssd's AD integration, as that it doesn't expect the RIDs to increase in a
 single domain
 so quickly. 


Thanks!

cs


More information about the samba-technical mailing list