Bug 43858 - Test case 60_umc/04_udm_policies fails in UCS 4.2
Test case 60_umc/04_udm_policies fails in UCS 4.2
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UMC - Policies
UCS 4.2
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
: 44205 44538 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-15 06:18 CET by Stefan Gohmann
Modified: 2020-07-03 20:54 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.103
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2017-03-15 06:18:09 CET
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 ***
Comment 1 Florian Best univentionstaff 2017-03-16 16:12:15 CET
Looks like a real regression in the evaluation of policies.
Comment 2 Stefan Gohmann univentionstaff 2017-03-17 16:25:44 CET
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)
Comment 3 Florian Best univentionstaff 2017-03-31 17:41:06 CEST
*** Bug 44205 has been marked as a duplicate of this bug. ***
Comment 4 Stefan Gohmann univentionstaff 2017-04-12 08:03:42 CEST
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
Comment 5 Florian Best univentionstaff 2017-05-05 11:39:39 CEST
*** Bug 44538 has been marked as a duplicate of this bug. ***
Comment 6 Eduard Mai univentionstaff 2018-03-08 13:42:21 CET
(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?
Comment 7 Ingo Steuwer univentionstaff 2020-07-03 20:54:29 CEST
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.