Bug 2189946 - RFE support of slapi_memberof for plugins/core server
Summary: RFE support of slapi_memberof for plugins/core server
Keywords:
Status: VERIFIED
Alias: None
Deadline: 2023-07-17
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: 389-ds-base
Version: 9.3
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: 9.3
Assignee: thierry bordaz
QA Contact: LDAP QA Team
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-26 14:21 UTC by thierry bordaz
Modified: 2023-08-11 10:48 UTC (History)
4 users (show)

Fixed In Version: 389-ds-base-2.3.4-3.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Enhancement
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 5156 0 None open RFE create a slapi-private function that returns the groups that a target entry is member of 2023-04-26 14:24:17 UTC
Red Hat Issue Tracker IDMDS-2976 0 None None None 2023-04-26 14:25:38 UTC
Red Hat Issue Tracker IDMDS-3463 0 None None None 2023-07-25 13:34:34 UTC
Red Hat Issue Tracker RHELPLAN-155856 0 None None None 2023-04-26 14:22:51 UTC

Description thierry bordaz 2023-04-26 14:21:46 UTC
Description of problem:
The upstream RFE https://github.com/389ds/389-ds-base/issues/5156 implements a new slapi function slapi_memberof.
        
This function is described in https://www.port389.org/docs/389ds/design/slapi_memberof.html
For a given target entry, it allows the caller to retrieve all entries that have a membership relation to that entry.

Typically, retrieving the groups that the given entry is memberof.

Comment 2 thierry bordaz 2023-04-26 14:37:38 UTC
This RFE was pushed upstream -> POST

Currently
  RFE code was pushed upstream
  RFE tests testing recomputation were pushed upstream

Next
  RFE tests testing reuse memberof results will be reviewed soon

Comment 3 bsmejkal 2023-07-25 13:33:17 UTC
Hi Thierry,
all tests related to the RFE fail with:

dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_simple - FileNotFoundError: [Errno 2] No such file or directory: '/mnt/tests/rhds/tests/upstream/ds/ldap/servers/slapd/haproxy.h'

The test preparation collects the missing haproxy.h file, which is related to another RFE (https://github.com/389ds/389-ds-base/issues/3527). 
It was postponed to RHEL 9.4 as the proxy feature is quite extensive and therefore it is included in branch 2.4.

Since it is just an include, after removing the haproxy file, all tests pass.


I want to confirm if removing the haproxy from include part in the tests would be a suitable change for 389-ds-base-2.3 branch or if it might introduce issues elsewhere.
Thanks!

Comment 4 thierry bordaz 2023-07-26 13:47:54 UTC
I think the build is missing some others commits (at least https://github.com/389ds/389-ds-base/commit/eaabdd2a34d4d8e3e70ac1d6d112927d896c4d73):
MAIN
git log --oneline | grep 5156
eaabdd2a3 Issue 5156 - (cont) RFE slapi_memberof reusing memberof values (#5744)
ea0ed1f51 Issue 5156 - build warnings (#5758)
881cade75 Issue 5156 - fix build breakage from slapi-memberof commit
9a05477f6 Issue 5156 - RFE that implement slapi_memberof (#5694)

RHEL-9.3
it log --oneline | grep 5156
b7dccdc0b Issue 5156 - RFE that implement slapi_memberof (#5694)

As temporary workaround, you may try to add 'haproxy.h' in https://github.com/389ds/389-ds-base/blob/main/dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py#L88

Comment 5 bsmejkal 2023-08-07 19:04:00 UTC
The tests will pass with the mentioned workarounds.
But I am moving it to ASSIGNED as per comment #c4 because there are few commits missing.

Comment 11 bsmejkal 2023-08-11 10:39:41 UTC
============================================================================================================ test session starts =============================================================================================================
platform linux -- Python 3.9.17, pytest-7.4.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.9.17', 'Platform': 'Linux-5.14.0-350.el9.x86_64-x86_64-with-glibc2.34', 'Packages': {'pytest': '7.4.0', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '3.0.0', 'html': '3.2.0', 'libfaketime': '0.1.2', 'flaky': '3.7.0'}}
389-ds-base: 2.3.6-2.el9
nss: 3.90.0-3.el9_2
nspr: 4.35.0-3.el9_2
openldap: 2.6.3-1.el9
cyrus-sasl: 2.1.27-21.el9
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests
configfile: pytest.ini
plugins: metadata-3.0.0, html-3.2.0, libfaketime-0.1.2, flaky-3.7.0
collected 21 items                                                                                                                                                                                                                           

dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_simple PASSED                                                                                                                                     [  4%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_allbackends_on PASSED                                                                                                                             [  9%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_allbackends_off PASSED                                                                                                                            [ 14%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_memberattr PASSED                                                                                                                                 [ 19%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_scope PASSED                                                                                                                                      [ 23%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_excludescope PASSED                                                                                                                               [ 28%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_skip_nested PASSED                                                                                                                                [ 33%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_maxgroup PASSED                                                                                                                                   [ 38%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_if_possible_1 PASSED                                                                                                                        [ 42%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_if_possible_2 PASSED                                                                                                                        [ 47%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_if_possible_3 PASSED                                                                                                                        [ 52%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_if_possible_4 PASSED                                                                                                                        [ 57%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_if_possible_5 PASSED                                                                                                                        [ 61%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_if_possible_6 PASSED                                                                                                                        [ 66%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_if_possible_7 PASSED                                                                                                                        [ 71%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_if_possible_8 PASSED                                                                                                                        [ 76%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_if_possible_9 PASSED                                                                                                                        [ 80%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_if_possible_10 PASSED                                                                                                                       [ 85%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_if_possible_11 PASSED                                                                                                                       [ 90%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_only_1 PASSED                                                                                                                               [ 95%]
dirsrvtests/tests/suites/slapi_memberof/basic_interface_test.py::test_slapi_memberof_reuse_only_2 PASSED                                                                                                                               [100%]

=============================================================================================== 21 passed, 1568 warnings in 159.94s (0:02:39) ================================================================================================

Marking as Verified:Tested.

Comment 14 bsmejkal 2023-08-11 10:48:57 UTC
As per comment #c11 marking as VERIFIED.


Note You need to log in before you can comment on or make changes to this bug.