Bug 1759142
| Summary: | No error returned when adding an entry matching filters for a non existing automember group | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | sgouvern |
| Component: | 389-ds-base | Assignee: | thierry bordaz <tbordaz> |
| Status: | CLOSED ERRATA | QA Contact: | RHDS QE <ds-qe-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.7 | CC: | mreynolds, nkinder, pasik, spichugi, tbordaz, vashirov |
| Target Milestone: | rc | Keywords: | TestCaseProvided |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 389-ds-base-1.3.10.2-1.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-09-29 19:46:50 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
sgouvern
2019-10-07 13:21:14 UTC
I think it is not related to https://pagure.io/389-ds-base/issue/50077, #50077 is the ability to trigger automember upon a MOD for which the resulting target entry match the automember config. I think this bug requested behavior may be in conflict with https://pagure.io/389-ds-base/issue/50282 - If the automember target group does not exist return an error - But if the original operation is a DEL of the target group, it should succeeds even if some former members still match the group membership. I would prefer the second option you propose to log a message and let the operation be successful As a follow up of previous update, #50282 should already log a warning when the member entry is added:
==> automember_update_member_value - group (default or target) does not exist (%s)
But this is logged only with errorlog-level=65536 (plugin). So the log could easily be changed to SLAP_LOG_WARNING
upstream ticket https://pagure.io/389-ds-base/issue/50914 fix pushed upstream -> POST Verified with 389-ds-base: 1.3.10.2-1.el7
# py.test -v ds/dirsrvtests/tests/suites/automember_plugin/automember_test.py::test_no_default_group
=============================================== test session starts ================================================
platform linux -- Python 3.6.8, pytest-5.4.1, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-3.10.0-1127.el7.x86_64-x86_64-with-redhat-7.8-Maipo', 'Packages': {'pytest': '5.4.1', 'py': '1.8.1', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.8.0', 'html': '2.1.1'}}
389-ds-base: 1.3.10.2-1.el7
nss: 3.44.0-7.el7_7
nspr: 4.21.0-1.el7
openldap: 2.4.44-21.el7_6
cyrus-sasl: 2.1.26-23.el7
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, inifile: pytest.ini
plugins: metadata-1.8.0, html-2.1.1
collected 1 item
ds/dirsrvtests/tests/suites/automember_plugin/automember_test.py::test_no_default_group PASSED [100%]
================================================ 1 passed in 24.70s ================================================
Message in the errors log :
[06/Apr/2020:08:01:07.698970098 -0400] - INFO - auto-membership-plugin - automember_update_member_value - group (default or target) does not exist (cn=invalid group,ou=Groups,dc=example,dc=com)
=> Marking as VERIFIED and opening an RFE (bz1821263) to have too an explicit message on the client side.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (389-ds-base bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:3894 |