#50316 Ticket 49390, 50019 - support cn=config compare operations
Closed by spichugi. Opened by firstyear.
firstyear/389-ds-base 49390-ldap-cn-config-compare-server  into  master

Download 50316.patch

Bug Description: Ansible will attempt to check the state of a value
before it makes an alteration on the ldap server. To do this in a
correct and schema aware fashion, it will use the ldapcompare operation.

It's a request that people want to manage their cn=config with ansible,
however dse.c didn't support ldapcompare on these backends.

Fix Description: Add support for ldapcompare operations on dse.c,
including the ability to correctly generate the cn=config defaults
into the entry for comparison.

This also adds support for ldapcompare as the default comparitor in
lib389.

https://pagure.io/389-ds-base/issue/49390
https://pagure.io/389-ds-base/issue/50019

Author: William Brown william@blackhats.net.au

Review by: ???

If I understood the PR correctly, you changed the ldapcompare behavior for working with cn=config. Is it possible to add some simple tests for that case?

Also, I am a bit new to this. How can I try ldap/admin/src/scripts/ns-slapd-gdb.py ?
I've run the instance with gdb --args /usr/sbin/ns-slapd -D /etc/dirsrv/slapd-localhost -i /var/run/dirsrv/slapd-localhost.pid and typed source /mnt/tests/rhds/tests/upstream/ds/ldap/admin/src/scripts/ns-slapd-gdb.py afterwards. And then run.
Nothing special has happened.

What is the right use for this tool?

There are already test cases? That's what the compare tests I was working on recently do ...

To use the script with the rpm, installed, IE /usr/sbin/ns-slapd, it autoloads. so just use the ds-* commands in gdb.

Remember, sourcing just bring the commands in, you need to run them like "ds-backtrace" or whatever.

There are already test cases? That's what the compare tests I was working on recently do ...

Right. By some reason, I remembered that you've added some directory entry compare tests.
But now I see you've added the cn=config one.
It passes with the PR, BTW.

To use the script with the rpm, installed, IE /usr/sbin/ns-slapd, it autoloads. so just use the ds-* commands in gdb.

Yeah, I've already discussed it with guys on the scrum. But thank you anyway :)

Remember, sourcing just bring the commands in, you need to run them like "ds-backtrace" or whatever.

For sure, I remember. :) I was just describing my initial steps.

You have my ack! The code works and I don't see any issues with the logic.

rebased onto 56373fb562fc86e53e5ba8ffd5e5d09c21f532f5

Pull-Request has been merged by firstyear

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3375

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata