[Fedora-directory-devel] Please review: distributed numeric assignment plugin

Pete Rowley prowley at redhat.com
Fri Jan 19 21:50:39 UTC 2007


New pre-operation plugin:

General numeric sequencer that allows generation of sequenced unique 
numbers such as posix uidNumber, posix gidNumber, Samba SambaSID etc. in 
an MMR environment. Rather than network locking or number pooling 
schemes, the approach taken is to allow the configuration of an interval 
that should be equal to or greater than the number of masters in the 
deployment. Then each master is assigned starting numbers in sequence 
e.g. server 1, 500; server 2, 501; server 3, 502 etc. When the interval 
is configured as 3, the servers will generate sequences like so: server 
1, 500, 503, 506...; server 2, 501, 504, 507; server 3, 502, 505, 508. 
Of course, in single master environments the interval may be set to one 
for a monotonically increasing sequence. Adding masters that exceed the 
interval requires that the configuration be reset, starting from a value 
higher than the highest currently assigned value.

Multiple types may be configured. An LDAP search filter must be added to 
the configuration for each type, the filter may be as complex as desired 
and determines to which entries the configuration applies - at minimum 
this filter should restrict the configuration to objectclasses that 
allow the type since no schema checking is done by the plugin.  
Generated values may have a pre-fix configured to be pre-pended to the 
value (useful for systems such as Samba when it needs a new SID). Each 
configuration entry may be scoped with a configuration attribute 
containing a DN, where conflicts arise due to scope the closest scope wins.

Configuration is dynamic. That is, once the plugin entry has been added 
to cn=plugins, cn=config and the server restarted, any configuration 
change will be observed. Configuration entries that do not contain an 
attribute type, a starting value, an interval value, and a filter will 
be ignored. Which configuration entries have been skipped can be 
determined by config level logging.

Example configuration ldif and test ldaifs along with some scripts are 
included. The main source is in dna.c.

-- 
Pete

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: addentries.sh
Type: application/x-shellscript
Size: 103 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.sh
Type: application/x-shellscript
Size: 275 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0001.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: del_test_entries.dns
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: delentries.sh
Type: application/x-shellscript
Size: 111 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dna.c
Type: text/x-csrc
Size: 28294 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0003.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dna.ldif
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0002.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: editentries.sh
Type: application/x-shellscript
Size: 127 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oneentry.sh
Type: application/x-shellscript
Size: 102 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0005.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: posix.ldif
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0003.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: posix_one.ldif
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0004.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: posix_test.ldif
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0005.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seeconfig.sh
Type: application/x-shellscript
Size: 169 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seeentries.sh
Type: application/x-shellscript
Size: 137 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0007.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: subtest.ldif
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0006.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070119/6a37950d/attachment-0008.bin>


More information about the Fedora-directory-devel mailing list