#48 dsconf support for usn plugin
Closed: Fixed Opened by firstyear.

dsconf should support configuration of the USN plugin on an instance.


Metadata Update from @ilias95:
- Issue assigned to ilias95

I think I have this complete, but I have a problem with a test case. Not sure if it's a bug or I'm doing something wrong.

0001-Issue-48-Add-support-for-USN-plugin.patch

More specifically the global mode of USN doesn't seem to work. Test case on line 452 fails. I'm using a separate DS instance just for this test so it can run independantly

Line 479 fails. In global usn mode a central "lastusn" is supposed to exist. However, in my test "lastusn;userroot" and "lastusn;people4data" exist instead which should be the case in local USN mode, not global.

Also line 488 fails which makes clear that separate USN counters per backend are used instead of a global one.

Any help with this?

@mreynolds Can you help with this USN issue? I'm not very familiar with the plugin, so maybe you have some input here?

Otherwise the patch is really looking great. This is a really simple plugin so I didn't expect you to have much trouble with this.

I think the only thing I'd say is the local/global set interface. In my mind this makes more sense as:

dsconf inst usn global [on/off]

And with no args would show the current state. ithink having two commands that toggle the same setting is not very intuitive.

Thanks again,

@firstyear I'd be happy to change this as you suggest.

As far as the test case I'm talking about above. There might be a bug in USN. It seems that this is always set to false no matter what:

https://pagure.io/389-ds-base/blob/master/f/ldap/servers/plugins/usn/usn.c#_667
https://pagure.io/389-ds-base/blob/master/f/ldap/servers/slapd/libglobs.c#_6646

Any help with this?

Well, finally the issue was that I was putting the nsslapd-entryusn-global attribute under cn=USN,cn=plugins,cn=config instead of cn=config. This was due to an error in the documentation that has been reported already.

So, all tests pass now and I updated the local/global mode set interface as William suggested.

0001-Issue-48-Add-support-for-USN-plugin.patch

Updated based on some IRC feedback:

0001-Issue-48-Add-support-for-USN-plugin.patch

commit 6fb2933fff9c0a9ea1efe032b6c85c37064877b2
To ssh://git@pagure.io/lib389.git
b66a2d0..6fb2933 master -> master

Great work, tests pass 100% on my env.

Metadata Update from @ilias95:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

Metadata