Hi all,
I'm doing a bit of playing with slapo-pcache and have it working fairly well (particularly once I realised that an individual attr can live in only one proxyattrset).
However, there's one bit that I can't get working - is there any way to define a template that will match a search which doesn't provide an attr list?
i.e. I can see quite a few searches (presumably from amd) of the following form (spacing and formatting changed by me to make it more readable):
Jul 23 14:54:16 host1 slapd[26671]: conn=49 op=1 SRCH base="dc=inf,dc=ed,dc=ac,dc=uk" scope=2 deref=0 filter="(&(objectClass=amdmap)(amdmapName=home)(amdmapKey=root))"
Jul 23 14:54:16 host1 slapd[26671]: query template of incoming query = (&(objectClass=)(amdmapName=)(amdmapKey=))
Jul 23 14:54:16 host1 slapd[26671]: QUERY NOT ANSWERABLE Jul 23 14:54:16 host1 slapd[26671]: QUERY NOT CACHEABLE
Jul 23 14:54:16 host1 slapd[26671]: conn=49 op=1 SEARCH RESULT tag=101 err=0 nentries=0 text=
Note that there's no 'SRCH attr=' line.
I've tried proxyattrset of the following forms...
proxyattrset 1 * proxyattrset 1
(both of which crash slapd)
And also
proxyattrset 1 <full list of attrs returned when none specified>
.... but this didn't work either.
Thanks in advance for any advice,
Cheers Toby Blake School of Informatics University of Edinburgh
On Thursday 26 July 2007 16:05, Toby Blake wrote:
Hi all,
I'm doing a bit of playing with slapo-pcache and have it working fairly well (particularly once I realised that an individual attr can live in only one proxyattrset).
Hm, I don't think that is correct. AFAIK it is possible to have an attribute present in multiple proxyattrsets.
However, there's one bit that I can't get working - is there any way to define a template that will match a search which doesn't provide an attr list?
No. That is not possible.
i.e. I can see quite a few searches (presumably from amd) of the following form (spacing and formatting changed by me to make it more readable):
Jul 23 14:54:16 host1 slapd[26671]: conn=49 op=1 SRCH base="dc=inf,dc=ed,dc=ac,dc=uk" scope=2 deref=0 filter="(&(objectClass=amdmap)(amdmapName=home)(amdmapKey=root))"
Jul 23 14:54:16 host1 slapd[26671]: query template of incoming query = (&(objectClass=)(amdmapName=)(amdmapKey=))
Jul 23 14:54:16 host1 slapd[26671]: QUERY NOT ANSWERABLE Jul 23 14:54:16 host1 slapd[26671]: QUERY NOT CACHEABLE
Jul 23 14:54:16 host1 slapd[26671]: conn=49 op=1 SEARCH RESULT tag=101 err=0 nentries=0 text=
Note that there's no 'SRCH attr=' line.
I've tried proxyattrset of the following forms...
proxyattrset 1 * proxyattrset 1
(both of which crash slapd)
And also
proxyattrset 1 <full list of attrs returned when none specified>
.... but this didn't work either.
Thanks in advance for any advice,
I'm doing a bit of playing with slapo-pcache and have it working fairly well (particularly once I realised that an individual attr can live in only one proxyattrset).
Hm, I don't think that is correct. AFAIK it is possible to have an attribute present in multiple proxyattrsets.
Hmmm, I may do a bit more checking on this, as I had some proxy templates which were working and some which weren't - for no reason that I could make out.
Then I came across this...
http://www.openldap.org/lists/openldap-bugs/200610/msg00090.html
.... which claims, in slapd.conf comments, that "Only one proxyattrset definition may appear for any cache set".
I don't know whether this is accurate, but working on this assumption and combining proxyattrsets accordingly, all my templates now seem to work.
However, there's one bit that I can't get working - is there any way to define a template that will match a search which doesn't provide an attr list?
No. That is not possible.
Ah, OK, unfortunate. Thanks.
<snip>
Toby
Bad form replying to myself, I know, but...
http://www.openldap.org/lists/openldap-bugs/200610/msg00090.html
.... which claims, in slapd.conf comments, that "Only one proxyattrset definition may appear for any cache set".
Which was completely the wrong quote. It should have read:
"A given attribute may only appear in one proxyattrset"
Toby
On Freitag, 27. Juli 2007, Toby Blake wrote:
Bad form replying to myself, I know, but...
http://www.openldap.org/lists/openldap-bugs/200610/msg00090.html
.... which claims, in slapd.conf comments, that "Only one proxyattrset definition may appear for any cache set".
Which was completely the wrong quote. It should have read:
"A given attribute may only appear in one proxyattrset"
Hm, funny enough if you look a few lines deeper in the above mail you will see, that every attributeset, that is defined there, contains the "objectclass" Attributetype :). And I didn't find any indication in the available documentation that that requirement is really true.
http://www.openldap.org/lists/openldap-bugs/200610/msg00090.html
.... which claims, in slapd.conf comments, that "Only one proxyattrset definition may appear for any cache set".
Which was completely the wrong quote. It should have read:
"A given attribute may only appear in one proxyattrset"
Hm, funny enough if you look a few lines deeper in the above mail you will see, that every attributeset, that is defined there, contains the "objectclass" Attributetype :).
Hmmm, yes, so it does.
And I didn't find any indication in the available documentation that that requirement is really true.
Me neither, just that it was only when I started working with this assumption (that an attr can only belong in one attrset) that I got my templates working. I couldn't see any reason for some of them not working prior to that.
Looks like I need to do a bit more testing on this...
Toby
Hi all,
Apologies for digging up the past, but I asked about this in July last year....
Date: Fri, 27 Jul 2007 13:42:41 +0200 From: Ralf Haferkamp rhafer@suse.de To: openldap-software@openldap.org Subject: Re: using slapo-pcache with an empty attr list
<snip>
However, there's one bit that I can't get working - is there any way to define a template that will match a search which doesn't provide an attr list?
No. That is not possible.
<snip>
Are there any plans on introducing such a feature, or technical reasons why it can't be done? On a typical machine on which I'm running slapo-pcache, I get about 70-80% of queries answered from the cache - this would be 90%+ if queries that didn't specify attr lists (i.e. gets all user attributes) could also be cached.
I'm not saying that I should be able to specify an emptry attr list with proxyattrset - that probably wouldn't make a lot of sense, but being able to set it to all the user attributes returned for a particular query that doesn't specify which attrs it wants would be very useful.
Cheers Toby Blake University of Edinburgh
Toby Blake wrote:
Hi all,
Apologies for digging up the past, but I asked about this in July last year....
See ITS#5074, this was added to RE24 a couple weeks after the below post.
Date: Fri, 27 Jul 2007 13:42:41 +0200 From: Ralf Haferkamprhafer@suse.de To: openldap-software@openldap.org Subject: Re: using slapo-pcache with an empty attr list
<snip>
However, there's one bit that I can't get working - is there any way to define a template that will match a search which doesn't provide an attr list?
No. That is not possible.
<snip>
Are there any plans on introducing such a feature, or technical reasons why it can't be done? On a typical machine on which I'm running slapo-pcache, I get about 70-80% of queries answered from the cache - this would be 90%+ if queries that didn't specify attr lists (i.e. gets all user attributes) could also be cached.
I'm not saying that I should be able to specify an emptry attr list with proxyattrset - that probably wouldn't make a lot of sense, but being able to set it to all the user attributes returned for a particular query that doesn't specify which attrs it wants would be very useful.
Cheers Toby Blake University of Edinburgh
On 5 Jun 2008, at 17:01, Howard Chu wrote:
See ITS#5074, this was added to RE24 a couple weeks after the below post.
Brilliant, thanks for that - it'll help as a gentle nudge to move from 2.3 to 2.4.
Cheers Toby
openldap-software@openldap.org