Bug 37595 - S4 Jenkins master test fail since Bug #37467
S4 Jenkins master test fail since Bug #37467
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: S4 Connector
unspecified
Other Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Dmitry Galkin
Arvid Requate
:
: 37634 37635 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-22 20:27 CET by Arvid Requate
Modified: 2015-03-26 12:26 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
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
lowercase_dn.patch (3.24 KB, patch)
2015-02-15 14:04 CET, Stefan Gohmann
Details | Diff
udm.sh test lib patch (option 1) (515 bytes, patch)
2015-02-24 11:24 CET, Dmitry Galkin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2015-01-22 20:27:06 CET
After the S4 Jenkins master test has been adjusted (Bug #33110) to setup a CammelCase domain a couple of tests seem to break:

http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-0/job/Autotest%20MultiEnv/SambaVersion=s4,Systemrolle=master/120/

For example this one:

http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-0/job/Autotest%20MultiEnv/SambaVersion=s4,Systemrolle=master/lastCompletedBuild/testReport/52_s4connector/100sync_gpo_ntsecurity_descriptor/test/

Since only the S4 master and not the backup are affected this indicates that the CamelCase domainname causes the issues.

We should check this and either derive product bugs from the test results (and errata-fix them) or fix the test cases.
Comment 1 Arvid Requate univentionstaff 2015-01-27 14:11:38 CET
*** Bug 37634 has been marked as a duplicate of this bug. ***
Comment 2 Arvid Requate univentionstaff 2015-01-27 14:11:44 CET
*** Bug 37635 has been marked as a duplicate of this bug. ***
Comment 3 Arvid Requate univentionstaff 2015-01-27 14:12:50 CET
10_ldap/55slapd-crash-1270:  --set nestedGroup fails  -> product bug 37632
51_samba4/43access_sysvol: Minor workaround (fixed)
51_samba4/51create_gpo: Minor workaround (fixed)
52_s4connector/100sync_gpo_ntsecurity_descriptor: product bug 37633



Remaining ucs-test cases that must be fixed via this Bug:

52_s4connector/107sync_groupmembership_ad_to_ucs
52_s4connector/156sync_ad_user_group_membership
52_s4connector/157sync_ad_user_primarygroup
52_s4connector/170sync_ad_move_user
52_s4connector/173sync_create_ucs_groups_nest_on_ad_side
52_s4connector/201read_initial_membership_ad_to_ucs
52_s4connector/256read_ad_user_group_membership
52_s4connector/257read_ad_user_primarygroup
52_s4connector/270read_ad_move_user
Comment 4 Arvid Requate univentionstaff 2015-01-27 14:42:02 CET
My first impression is that the 52_s4connector tests fail because the s4-connector actually doesn't handle DN case properly during sync, at least from S4 to UCS.
Comment 5 Arvid Requate univentionstaff 2015-01-27 14:42:57 CET
For attribute values that is..  uniqueMember in this case.
Comment 6 Arvid Requate univentionstaff 2015-01-29 18:29:55 CET
Yes, this seems to be a well known S4 Connector behaviour.


Quoting from Bug 32768 Comment 6:

Q: [...] the S4-Connector does not preserve the case of the member DNs. Maybe this is also a generic bug?
A: No, that is not a new bug. The connector does this for group members only.
Comment 7 Stefan Gohmann univentionstaff 2015-02-15 14:04:48 CET
Created attachment 6675 [details]
lowercase_dn.patch

Some untested fixes for some of the connector tests.
Comment 8 Arvid Requate univentionstaff 2015-02-16 20:56:07 CET
Ok, maybe it's enough to fix the tests like that.  Dmitry, could you do that?
Comment 9 Dmitry Galkin univentionstaff 2015-02-24 11:23:42 CET
(In reply to Arvid Requate from comment #8)
> Ok, maybe it's enough to fix the tests like that.  Dmitry, could you do that?

It looks like the easy way to fix the tests is to actually modify the udm.sh test lib a bit, I see two options:

1. The function 'udm_verify_multi_value_udm_attribute_contains' calls 'verify_value_contains_line' inside, which can be changed instead to 'verify_value_contains_line_ignore_case'. This can potentially affect some other tests in '52_s4connector' or '55_adconnector', there are a lot and it will take too long to check each and look through the code.

2. A bit safer way is to write a function similar to 'udm_verify_multi_value_udm_attribute_contains' that would use the '_ignore_case' and change only the tests as specified in Comment 3 to use it.


Tests from the Comment 3 pass with the proposed fix. So, which option we prefer?
Comment 10 Dmitry Galkin univentionstaff 2015-02-24 11:24:14 CET
Created attachment 6712 [details]
udm.sh test lib patch (option 1)
Comment 11 Stefan Gohmann univentionstaff 2015-02-24 11:46:29 CET
(In reply to Dmitry Galkin from comment #9)
> (In reply to Arvid Requate from comment #8)
> > Ok, maybe it's enough to fix the tests like that.  Dmitry, could you do that?
> 
> It looks like the easy way to fix the tests is to actually modify the udm.sh
> test lib a bit, I see two options:
> 
> 1. The function 'udm_verify_multi_value_udm_attribute_contains' calls
> 'verify_value_contains_line' inside, which can be changed instead to
> 'verify_value_contains_line_ignore_case'. This can potentially affect some
> other tests in '52_s4connector' or '55_adconnector', there are a lot and it
> will take too long to check each and look through the code.

No, it depends on the schema definition. We shouldn't ignore the case by default.

> 2. A bit safer way is to write a function similar to
> 'udm_verify_multi_value_udm_attribute_contains' that would use the
> '_ignore_case' and change only the tests as specified in Comment 3 to use it.

Yes, that would be better.
Comment 12 Dmitry Galkin univentionstaff 2015-02-24 14:44:58 CET
(In reply to Stefan Gohmann from comment #11)
> Yes, that would be better.

r58389:
  * 52_s4connector/257read_ad_user_primarygroup;
    52_s4connector/270read_ad_move_user;
    52_s4connector/256read_ad_user_group_membership;
    52_s4connector/107sync_groupmembership_ad_to_ucs;
    52_s4connector/157sync_ad_user_primarygroup;
    52_s4connector/173sync_create_ucs_groups_nest_on_ad_side;
    52_s4connector/170sync_ad_move_user;
    52_s4connector/156sync_ad_user_group_membership;
    52_s4connector/201read_initial_membership_ad_to_ucs:
        updated tests to work with CamelCase ldap/base (Bug #37595).

r58388:
  * lib/udm.sh: added function 'udm_verify_multi_value_udm_attribute_contains'
    that is not case sensetive (Bug #37595).
Comment 13 Dmitry Galkin univentionstaff 2015-02-27 10:30:04 CET
(In reply to Arvid Requate from comment #3)

> Remaining ucs-test cases that must be fixed via this Bug:
> 
> 52_s4connector/107sync_groupmembership_ad_to_ucs
> 52_s4connector/156sync_ad_user_group_membership
> 52_s4connector/157sync_ad_user_primarygroup
> 52_s4connector/170sync_ad_move_user
> 52_s4connector/173sync_create_ucs_groups_nest_on_ad_side
> 52_s4connector/201read_initial_membership_ad_to_ucs
> 52_s4connector/256read_ad_user_group_membership
> 52_s4connector/257read_ad_user_primarygroup
> 52_s4connector/270read_ad_move_user

Seems like there is one more?  52_s4connector.101sync_initial_membership_ad_to_ucs.test

http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-1/job/Autotest%20MultiEnv/22/SambaVersion=s4,Systemrolle=master/testReport/junit/52_s4connector/101sync_initial_membership_ad_to_ucs/test/
Comment 14 Stefan Gohmann univentionstaff 2015-03-19 14:37:35 CET
(In reply to Dmitry Galkin from comment #13)
> Seems like there is one more? 
> 52_s4connector.101sync_initial_membership_ad_to_ucs.test

Yes, please fix it as well.
Comment 15 Dmitry Galkin univentionstaff 2015-03-20 10:24:56 CET
(In reply to Stefan Gohmann from comment #14)
> (In reply to Dmitry Galkin from comment #13)
> > Seems like there is one more? 
> > 52_s4connector.101sync_initial_membership_ad_to_ucs.test
> 
> Yes, please fix it as well.

r59285:
  * 52_s4connector/101sync_initial_membership_ad_to_ucs: adjusted to
    work with CamelCase base DN (Bug #37595).
Comment 16 Arvid Requate univentionstaff 2015-03-24 17:49:28 CET
Ok, Jenkins result looks good.