#47573 MMR: schema push can be erronously prevented
Closed: wontfix None Opened 10 years ago by tbordaz.

With the ticket https://fedorahosted.org/389/ticket/47490, the schema is not pushed if the consumer schema is a superset of the supplier schema.

To determine that a schema is a superset, for each objectclass, the required attributes on the supplier are compared with the 'required' attribute on the consumer. Same thing for the 'may' attributes.

If we have an attribute that is moved on the supplier, from the 'may' list to the 'required' list. The supplier objectclass is a superset of the consumer objectclass, but will be evaluated to be subset => prevent schema push

For example
supplier consumer
OC_A
must Att_1, Att2 Att_1
may Att_3 Att_2, Att_3


{{{
For example

     supplier              Consumer

OC_A
must Att_1,Att_2 Att_1
may Att_3 Att_2, Att_3
}}}

During investigation I realized that I described the problem in the opposite way.

The problem occurs when an attribute is moved from 'MUST' to 'MAY', then schema push is prevented although it should occurs.

If we have a topology with

{{{
supplier Consumer
OC_A
must Att_1, Att_2 Att_1, Att_2
may Att_3 Att_3
}}}

Then any entry with OC_A, has Att_1, Att_2 and possibly Att_3
Then the schema is changed on the supplier like the following

{{{
supplier Consumer
OC_A
must Att_1 Att_1, Att_2
may Att_2, Att_3 Att_3
}}}

Any entry in the topology still conforms the schema of the supplier and of the consumer.
So it is valid to push the supplier schema altought the MUST attributes of the consumer is a superset of the MUST of the supplier.

c code - ack

python code - let me check in my schema changes for lib389 first

git merge ticket47573
Updating ce43858..332e36b
Fast-forward
dirsrvtests/tickets/ticket47573_test.py | 415 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ldap/servers/slapd/schema.c | 63 ++++++++-----
2 files changed, 458 insertions(+), 20 deletions(-)
create mode 100644 dirsrvtests/tickets/ticket47573_test.py

git push origin master

Counting objects: 16, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 5.70 KiB, done.
Total 9 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
ce43858..332e36b master -> master

commit 332e36b
Author: Thierry bordaz (tbordaz) tbordaz@redhat.com
Date: Tue Jan 14 13:40:35 2014 +0100

Metadata Update from @tbordaz:
- Issue assigned to tbordaz
- Issue set to the milestone: 1.3.3 - 1/14 (January)

7 years ago

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 issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/910

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata