Issue 7100 - slapo-dds: entryTTL not decreasing
Summary: slapo-dds: entryTTL not decreasing
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 13:34 UTC by Michael Ströder
Modified: 2018-03-22 19:24 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Michael Ströder 2011-11-29 13:34:05 UTC
Full_Name: 
Version: 
OS: 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (84.163.15.82)


As I read RFC 2589 the attribute entryTTL contains the actual time-to-live of a
dynamicObject entry. But slapo-dds always returns the same value for entryTTL
(last refreshTTL). Another server implementation returns decreasing values for
entryTTL which would be IMO the correct behaviour.
Comment 1 ando@openldap.org 2011-11-29 13:46:26 UTC
On 11/29/2011 02:34 PM, michael@stroeder.com wrote:
> Full_Name:
> Version:
> OS:
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (84.163.15.82)
>
>
> As I read RFC 2589 the attribute entryTTL contains the actual time-to-live of a
> dynamicObject entry. But slapo-dds always returns the same value for entryTTL
> (last refreshTTL). Another server implementation returns decreasing values for
> entryTTL which would be IMO the correct behaviour.

Good point.  I overlooked this in my original interpretation.  I'll look 
into this, time permitting.  Thanks, p.

-- 
Pierangelo Masarati
Associate Professor
Dipartimento di Ingegneria Aerospaziale
Politecnico di Milano

Comment 2 Michael Ströder 2011-11-29 13:48:49 UTC
Pierangelo Masarati wrote:
> Good point.  I overlooked this in my original interpretation.  I'll look into
> this, time permitting.  Thanks, p.

Take your time. Nothing urgent. I'm just playing with it for interop testing
(refresh operation and plugin classes in web2ldap).

Ciao, Michael.

Comment 3 Michael Ströder 2014-07-22 19:38:10 UTC
Would be nice if this gets ever fixed to match the RFC.

Comment 4 Ondřej Kuzník 2015-11-22 19:31:38 UTC
On Tue, Jul 22, 2014 at 07:38:26PM +0000, michael@stroeder.com wrote:
> Would be nice if this gets ever fixed to match the RFC.

Hi, can you test the changes in branch ITS7100 at
https://github.com/mistotebe/openldap?

Thanks,
Ondrej

Comment 5 Michael Ströder 2015-12-12 18:50:02 UTC
ondra@mistotebe.net wrote:
> On Tue, Jul 22, 2014 at 07:38:26PM +0000, michael@stroeder.com wrote:
>> Would be nice if this gets ever fixed to match the RFC.
> 
> Hi, can you test the changes in branch ITS7100 at
> https://github.com/mistotebe/openldap?

Sorry for following up so late.

I've tested your branch.

1. make test fails (maybe unrelated):

>>>> Starting test007-slapmodify for hdb...
running defines.sh
Running slapadd to build slapd database...
Testing modify, add, and delete using slapmodify...
slapmodify failed (1)!
>>>>> test007-slapmodify failed for hdb
(exit 1)
Makefile:302: recipe for target 'hdb-mod' failed
make[2]: *** [hdb-mod] Error 1
make[2]: Leaving directory '/home/michael/src/openldap-git/mistotebe/openldap/tests'
Makefile:280: recipe for target 'test' failed
make[1]: *** [test] Error 2
make[1]: Leaving directory '/home/michael/src/openldap-git/mistotebe/openldap/tests'
Makefile:292: recipe for target 'test' failed
make: *** [test] Error 2

2. entryTTL seems now to be decreased

It seems that when re-reading an entry the entryTTL is not always computed on
the fly. Rather the value is decreased every ~6 seconds (not matching dds-interval).

Ciao, Michael.


Comment 6 Michael Ströder 2015-12-12 19:04:30 UTC
Michael Ströder wrote:
> 1. make test fails (maybe unrelated):
> 
>>>>> Starting test007-slapmodify for hdb...

Ah, forgot ITS#8291. I will follow-up there after testing your branch ITS8291.

Ciao, Michael.

Comment 7 Ondřej Kuzník 2015-12-16 13:33:44 UTC
On Sat, Dec 12, 2015 at 06:50:12PM +0000, michael@stroeder.com wrote:
> ondra@mistotebe.net wrote:
>> On Tue, Jul 22, 2014 at 07:38:26PM +0000, michael@stroeder.com wrote:
>>> Would be nice if this gets ever fixed to match the RFC.
>> 
>> Hi, can you test the changes in branch ITS7100 at
>> https://github.com/mistotebe/openldap?
> 
> Sorry for following up so late.
> 
> I've tested your branch.
> 
> 2. entryTTL seems now to be decreased
> 
> It seems that when re-reading an entry the entryTTL is not always computed on
> the fly. Rather the value is decreased every ~6 seconds (not matching dds-interval).

Hi,
when watching the entries, they seem to be updating in real time for me
as expected, do you have a cache of some sort between you and the server?

Cheers,
Ondrej

Comment 8 Michael Ströder 2015-12-16 15:17:31 UTC
ondra@mistotebe.net wrote:
> when watching the entries, they seem to be updating in real time for me
> as expected, do you have a cache of some sort between you and the server?

Ah, sorry!
web2ldap has a short-time cache and I have to investiate why the URL argument
read_nocache=1 currently doesn't have any effect. :-/

Ok, your fix seems perfectly right.

Ciao, Michael.

Comment 9 Ondřej Kuzník 2017-03-30 09:20:15 UTC
The patches have been uploaded here:
ftp://ftp.openldap.org/incoming/Ondrej-Kuznik-20170330-ITS7100-dds-entryttl-accurracy.tgz

The attached patch file is derived from OpenLDAP Software. All of the
modifications to OpenLDAP Software represented in the following
patch(es) were developed by Ondřej Kuzník <ondra@mistotebe.net>. I have
not assigned rights and/or interest in this work to any party.

I, Ondřej Kuzník, hereby place the following modifications to OpenLDAP
Software (and only these modifications) into the public domain. Hence,
these modifications may be freely used and/or redistributed for any
purpose with or without attribution and/or other notice.

-- 
Ondřej Kuzník
Senior Software Engineer
Symas Corporation                       http://www.symas.com
Packaged, certified, and supported LDAP solutions powered by OpenLDAP

Comment 10 Quanah Gibson-Mount 2017-04-12 20:54:02 UTC
changed notes
moved from Incoming to Software Bugs
Comment 11 Quanah Gibson-Mount 2017-09-08 18:00:06 UTC
changed notes
Comment 12 Quanah Gibson-Mount 2017-09-08 18:09:51 UTC
changed notes
Comment 13 Quanah Gibson-Mount 2017-09-08 18:31:39 UTC
changed notes
Comment 14 Quanah Gibson-Mount 2017-10-06 17:54:28 UTC
changed notes
changed state Open to Test
Comment 15 Quanah Gibson-Mount 2017-10-11 19:30:00 UTC
changed notes
Comment 16 Quanah Gibson-Mount 2017-10-11 19:31:36 UTC
changed notes
changed state Test to Release
Comment 17 OpenLDAP project 2018-03-22 19:24:42 UTC
fixed in master
fixed in RE24 (2.4.46)
Comment 18 Quanah Gibson-Mount 2018-03-22 19:24:42 UTC
changed notes
changed state Release to Closed