Univention Bugzilla – Bug 43858
Test case 60_umc/04_udm_policies fails in UCS 4.2
Last modified: 2020-07-03 20:54:29 CEST
Please fix the test or fix the product or in case it is not so important disable the test case. http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/AutotestJoin/75/SambaVersion=s3,Systemrolle=master/testReport/ *** BEGIN *** ['/usr/bin/python', '04_udm_policies'] *** *** 60_umc/04_udm_policies *** Test UMC policy result *** *** START TIME: 2017-03-14 15:57:53 *** Creating settings/umc_operationset object with /usr/sbin/udm-test settings/umc_operationset create --position cn=operations,cn=UMC,cn=univention,dc=autotest090,dc=local --append operation=udm/object/policies --set name=test-umc-opset --set flavor=navigation --set 'description=policy result test op set' Creating policies/umc object with /usr/sbin/udm-test policies/umc create --position cn=UMC,cn=policies,dc=autotest090,dc=local --set name=test-umc-policy --set allow=cn=test-umc-opset,cn=operations,cn=UMC,cn=univention,dc=autotest090,dc=local Creating users/user object with /usr/sbin/udm-test users/user create --position cn=users,dc=autotest090,dc=local --policy-reference cn=test-umc-policy,cn=UMC,cn=policies,dc=autotest090,dc=local --set username=kn9u00mf5w --set firstname=dr64ffal7o --set lastname=vjx5e8arfm --set password=univention Creating policies/registry object with /usr/sbin/udm-test policies/registry create --position cn=policies,dc=autotest090,dc=local --set 'registry=baz 2' --set name=test-container-ucr-policy Creating policies/registry object with /usr/sbin/udm-test policies/registry create --position cn=policies,dc=autotest090,dc=local --append 'registry=baz 3' --append 'registry=bar 4' --set name=test-computer-ucr-policy Creating policies/registry object with /usr/sbin/udm-test policies/registry create --position cn=policies,dc=autotest090,dc=local --set 'registry=foo 1' --set name=test-root-ucr-policy Creating policies/registry object with /usr/sbin/udm-test policies/registry create --position cn=policies,dc=autotest090,dc=local --append 'registry=foo 0' --append 'registry=bar 5' --set name=test-various-ucr-policy Creating container/cn object with /usr/sbin/udm-test container/cn create --position dc=autotest090,dc=local --set name=root Creating container/cn object with /usr/sbin/udm-test container/cn create --position cn=root,dc=autotest090,dc=local --set name=computers2 Creating computers/domaincontroller_slave object with /usr/sbin/udm-test computers/domaincontroller_slave create --position cn=computers2,cn=root,dc=autotest090,dc=local --set name=m5pmt2dbsv . . Modifying container/cn object with /usr/sbin/udm-test container/cn modify --dn cn=root,dc=autotest090,dc=local --policy-reference cn=test-root-ucr-policy,cn=policies,dc=autotest090,dc=local *** UMC request: "POST auth" (None) UMC request payload: {'options': {'password': 'univention', 'username': 'kn9u00mf5w'}} *** UMC response: {u'message': None, u'options': None, u'result': {u'username': u'kn9u00mf5w'}, u'status': 200} *** *** UMC request: "POST command/udm/object/policies" (navigation) UMC request payload: {'flavor': 'navigation', 'options': [{'container': 'cn=computers2,cn=root,dc=autotest090,dc=local', 'objectDN': None, 'objectType': 'computers/domaincontroller_slave', 'policies': [None], 'policyType': 'policies/registry'}]} *** UMC response: {u'message': None, u'result': [{u'registry': [{u'fixed': 0, u'policy': u'cn=test-root-ucr-policy,cn=policies,dc=autotest090,dc=local', u'value': [u'foo', u'1']}]}], u'status': 200} *** OK: new inherit w/o_pol *** UMC request: "POST command/udm/object/policies" (navigation) UMC request payload: {'flavor': 'navigation', 'options': [{'container': 'cn=computers2,cn=root,dc=autotest090,dc=local', 'objectDN': None, 'objectType': 'computers/domaincontroller_slave', 'policies': ['cn=test-computer-ucr-policy,cn=policies,dc=autotest090,dc=local'], 'policyType': 'policies/registry'}]} *** UMC response: {u'message': None, u'result': [{u'registry': [{u'fixed': 0, u'policy': u'cn=test-root-ucr-policy,cn=policies,dc=autotest090,dc=local', u'value': [u'foo', u'1']}, {u'fixed': 0, u'policy': u'cn=test-computer-ucr-policy,cn=policies,dc=autotest090,dc=local', u'value': [u'baz', u'3']}, {u'fixed': 0, u'policy': u'cn=test-computer-ucr-policy,cn=policies,dc=autotest090,dc=local', u'value': [u'bar', u'4']}]}], u'status': 200} *** OK: new set_pol w/o_pol Modifying container/cn object with /usr/sbin/udm-test container/cn modify --dn cn=computers2,cn=root,dc=autotest090,dc=local --policy-reference cn=test-container-ucr-policy,cn=policies,dc=autotest090,dc=local . *** UMC request: "POST command/udm/object/policies" (navigation) UMC request payload: {'flavor': 'navigation', 'options': [{'container': 'cn=computers2,cn=root,dc=autotest090,dc=local', 'objectDN': None, 'objectType': 'computers/domaincontroller_slave', 'policies': [None], 'policyType': 'policies/registry'}]} *** UMC response: {u'message': None, u'result': [{u'registry': [{u'fixed': 0, u'policy': u'cn=test-root-ucr-policy,cn=policies,dc=autotest090,dc=local', u'value': [u'foo', u'1']}, {u'fixed': 0, u'policy': u'cn=test-container-ucr-policy,cn=policies,dc=autotest090,dc=local', u'value': [u'baz', u'2']}]}], u'status': 200} *** OK: new inherit w/pol *** UMC request: "POST command/udm/object/policies" (navigation) UMC request payload: {'flavor': 'navigation', 'options': [{'container': 'cn=computers2,cn=root,dc=autotest090,dc=local', 'objectDN': None, 'objectType': 'computers/domaincontroller_slave', 'policies': ['cn=test-computer-ucr-policy,cn=policies,dc=autotest090,dc=local'], 'policyType': 'policies/registry'}]} *** UMC response: {u'message': None, u'result': [{u'registry': [{u'fixed': 0, u'policy': u'cn=test-root-ucr-policy,cn=policies,dc=autotest090,dc=local', u'value': [u'foo', u'1']}, {u'fixed': 0, u'policy': u'cn=test-container-ucr-policy,cn=policies,dc=autotest090,dc=local', u'value': [u'baz', u'2']}, {u'fixed': 0, u'policy': u'cn=test-computer-ucr-policy,cn=policies,dc=autotest090,dc=local', u'value': [u'bar', u'4']}]}], u'status': 200} *** ### FAIL ### ERROR: new set_pol w/pol: set(['bar=4', 'foo=1', 'baz=3']) != set([u'bar=4', u'foo=1', u'baz=2']) ### ### Cleanup after exception: <type 'exceptions.SystemExit'> 1 Performing UCSTestUDM cleanup... UCSTestUDM cleanup done Warning: Failed to remove 'container/cn' object 'cn=computers2,cn=root,dc=autotest090,dc=local' *** END TIME: 2017-03-14 15:58:06 *** *** TEST DURATION (H:MM:SS.ms): 0:00:13.454408 *** *** END *** 1 ***
Looks like a real regression in the evaluation of policies.
Disable the test case. Please re-enable after fixing the bug. It isn't a regression since it fails in 4.1-4 as well. r77913: * 60_umc/04_udm_policies: temporary skip test case (Bug #43858)
*** Bug 44205 has been marked as a duplicate of this bug. ***
I remove the target milestone and re-tag it as bug report. I'm currently unsure how often this will happen in the real world
*** Bug 44538 has been marked as a duplicate of this bug. ***
(In reply to Florian Best from comment #1) > Looks like a real regression in the evaluation of policies. It worked for me during product test of UCS 4.3. UCR policies are evaluated via a cron job which runs /usr/share/univention-directory-policy/univention-directory-policy-cron. UCRV locks only worked after executing that by hand. The behavior is documented here: https://docs.software-univention.de/handbuch-4.2.html#ucr::templates::policy After a cursory read I don't see that happening in the test case. Invalid maybe?
This issue has been filed against UCS 4.2. UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.