[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Partial replication of attributes



Pierangelo Masarati wrote:
As suggested off-list by mdenk@whidbey.net:

"What I had to do in order to get selective replication to work was to
restrict the replication of certain attributes using the "!attr = attr1,
attr2, attr3 . . ." directive.  That works well for me."

Indeed it works better, but I'd like to remove posixAccount objectclass
and attributes on that replication, and now I get the following error
while the replicate tries to add a new entry:

object class 'posixAccount' requires attribute 'uidNumber'

although I put in my slapd.conf for that replica:
replica         host=ldaptux1.int-evry.fr:9000
                suffix="ou=people,dc=int-evry,dc=fr"
		objectclass!=posixAccount
                attr!=loginShell,homeDirectory,uidNumber,gidNumber,gecos


I don't recall seeing the "objectclass!=<ocname>" option
in replica partial replication; if you use the name of an
objectclass instead of an attribute type, then all the
attrs of that objectclass get automatically selected;
quoting a comment in servers/slapd/ad.c:

/*
 * Convert a delimited string into a list of AttributeNames;
 * add on to an existing list if it was given.  If the string
 * is not a valid attribute name, if a '-' is prepended it is
 * skipped and the remaining name is tried again; if a '+' is
 * prepended, an objectclass name is searched instead.
 *
 * NOTE: currently, if a valid attribute name is not found,
 * the same string is also checked as valid objectclass name;
 * however, this behavior is deprecated.
 */
AttributeName *
str2anlist()

I'm not sure whether this will cause all the atrs listed as
required/allowed for that objectclass will be processed
consequently.

Pierangelo.


Ok, I anticipated (invented) the objectclass!=something ...

so now I have:

replica host=ldaptux1.int-evry.fr:9000
suffix="ou=people,dc=int-evry,dc=fr"
attr!=posixAccount loginShell homeDirectory uidNumbergidNumber gecos



And I get "No objectClass for entry..." ?:

Jan 23 18:01:26 ldaptux1 slapd[17234]: conn=0 op=1 ADD dn="uid=fluerksu,ou=People,dc=int-evry,dc=fr"
Jan 23 18:01:26 ldaptux1 slapd[17234]: is_entry_objectclass("uid=fluerksu,ou=People,dc=int-evry,dc=fr", "2.5.17.0") no objectClass attribute
Jan 23 18:01:26 ldaptux1 slapd[17234]: No objectClass for entry (uid=fluerksu,ou=People,dc=int-evry,dc=fr)
Jan 23 18:01:26 ldaptux1 slapd[17234]: conn=0 op=1 RESULT tag=105 err=65 text=no objectClass attribute



Thanks.