Bug 37924 - 60_umc-system 33_umc_users_user_unset_userexpiry failed in UCS 4.0-1
60_umc-system 33_umc_users_user_unset_userexpiry failed in UCS 4.0-1
Status: NEW
Product: UCS Test
Classification: Unclassified
Component: UMC
unspecified
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-03 10:38 CET by Dmitry Galkin
Modified: 2016-11-10 14:15 CET (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
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

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Galkin univentionstaff 2015-03-03 10:38:33 CET
Test failed with a traceback recently: http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-1/job/Autotest%20MultiEnv/24/SambaVersion=s4,Systemrolle=master/testReport/junit/60_umc-system/33_umc_users_user_unset_userexpiry/test/

Standard Ausgabe (STDOUT)

Creating a user 'umc_test_user_w0ahbx' without posix
Creating users/user object with {'username': 'umc_test_user_w0ahbx', 'policy_reference': 'cn=default-umc-all,cn=UMC,cn=policies,dc=AutoTest091,dc=local', 'firstname': 'ptpw9pdqld', 'lastname': 'm4y83tstto', 'position': 'cn=users,dc=AutoTest091,dc=local', 'password': 'univention', 'options': ['posix', 'samba', 'kerberos']}
Waiting for replication:
OK: replication complete (nid=16808 lid=16808)
Done: replication complete.
Response Code: 200
Response Cookie: UMCSessionId=9b444fbb-7a02-4083-9ed3-0aacc18f0ccc; expires=Sun, 01-Mar-2020 02:27:42 GMT; Path=/; Version=1
Response Message: 
OK: unset of userexpiry via empty string succeeded
Cleanup after exception: <type 'exceptions.KeyError'> 'userexpiry'
Performing UCSTestUDM cleanup...
UCSTestUDM cleanup done

Standard Fehler (STDERR)

Traceback (most recent call last):
  File "33_umc_users_user_unset_userexpiry", line 134, in <module>
    sys.exit(TestUMC.main())
  File "33_umc_users_user_unset_userexpiry", line 121, in main
    if response[0]["userexpiry"] != "2015-02-02":
KeyError: 'userexpiry'
Comment 1 Stefan Gohmann univentionstaff 2016-11-08 14:05:10 CET
Happened again:

http://jenkins.knut.univention.de:8080/job/UCS-4.1/job/UCS-4.1-4/job/AutotestJoin/13/SambaVersion=s4,Systemrolle=master/testReport/junit/60_umc-system/33_umc_users_user_unset_userexpiry/test/

*** BEGIN *** ['/usr/bin/python', '33_umc_users_user_unset_userexpiry'] ***
*** 60_umc-system/33_umc_users_user_unset_userexpiry *** Test unsetting userexpiry attribute via UMC ***
*** START TIME: 2016-11-08 05:18:43 ***

Creating a user 'umc_test_user_mtonre' without posix
Creating users/user object with /usr/sbin/udm-test users/user create --position cn=users,dc=AutoTest091,dc=local --policy-reference cn=default-umc-all,cn=UMC,cn=policies,dc=AutoTest091,dc=local --option posix --option samba --option kerberos --set username=umc_test_user_mtonre --set firstname=jg3dvlpkxt --set lastname=tmh25xh8uo --set password=univention
. Waiting for DRS replication, filter: 'cn=umc_test_user_mtonre' . . . . 
DRS replication took 4 seconds
Response Code: 200
Response Cookie: UMCSessionId=13894091-0a05-4e5c-8de3-20e90406fe3a; expires=Sun, 08-Nov-2020 05:18:50 GMT; Path=/umcp/; Version=1, UMCUsername=Administrator; expires=Sun, 08-Nov-2020 05:18:50 GMT; Path=/umcp/; Version=1
Response Message: {"status": 200, "message": null, "options": null, "result": {"username": "Administrator"}}

*** UMC request: "command/udm/put" (users/user) 
data = [{'object': {'$dn$': 'uid=umc_test_user_mtonre,cn=users,dc=AutoTest091,dc=local',
             'userexpiry': '2015-02-02'}}]
*** UMC response: [{u'$dn$': u'uid=umc_test_user_mtonre,cn=users,dc=AutoTest091,dc=local',
  u'success': True}]


*** UMC request: "command/udm/get" (users/user) 
data = ['uid=umc_test_user_mtonre,cn=users,dc=AutoTest091,dc=local']
*** UMC response: [{u'$dn$': u'uid=umc_test_user_mtonre,cn=users,dc=AutoTest091,dc=local',
  u'$flags$': [],
  u'$labelObjectType$': u'Benutzer',
  u'$operations$': [u'add', u'edit', u'remove', u'search', u'move'],
  u'$options$': {u'kerberos': True,
                 u'ldap_pwd': False,
                 u'mail': True,
                 u'person': False,
                 u'pki': False,
                 u'posix': True,
                 u'samba': True},
  u'$policies$': {u'policies/umc': [u'cn=default-umc-all,cn=UMC,cn=policies,dc=AutoTest091,dc=local']},
  u'$references$': [],
  u'CtxBrokenSession': u'0000',
  u'CtxCallback': u'',
  u'CtxCallbackNumber': u'',
  u'CtxCfgClientDrivers': u'0',
  u'CtxCfgClientPrinters': u'0',
  u'CtxCfgDefaultClientPrinters': u'0',
  u'CtxCfgFlags1': u'',
  u'CtxCfgPresent': u'',
  u'CtxCfgTSLogon': u'1',
  u'CtxInitialProgram': u'',
  u'CtxKeyboardLayout': u'',
  u'CtxMaxConnectionTime': u'',
  u'CtxMaxDisconnectionTime': u'',
  u'CtxMaxIdleTime': u'',
  u'CtxMinEncryptionLevel': u'',
  u'CtxNWLogonServer': u'',
  u'CtxRASDialin': u'E',
  u'CtxReconnectSession': u'0000',
  u'CtxShadow': u'00000000',
  u'CtxStartprogramClient': u'0',
  u'CtxWFHomeDir': u'',
  u'CtxWFHomeDirDrive': u'',
  u'CtxWFProfilePath': u'',
  u'CtxWorkDirectory': u'',
  u'UniventionDovecotUserQuota': u'0',
  u'disabled': u'none',
  u'displayName': u'tmh25xh8uo',
  u'gecos': u'tmh25xh8uo',
  u'gidNumber': u'5001',
  u'groups': [u'cn=Domain Users,cn=groups,dc=AutoTest091,dc=local'],
  u'lastname': u'tmh25xh8uo',
  u'locked': u'none',
  u'primaryGroup': u'cn=Domain Users,cn=groups,dc=AutoTest091,dc=local',
  u'sambaRID': u'1906',
  u'shell': u'/bin/bash',
  u'uidNumber': u'2286',
  u'unixhome': u'/home/umc_test_user_mtonre',
  u'username': u'umc_test_user_mtonre'}]

Cleanup after exception: <type 'exceptions.KeyError'> 'userexpiry'
Performing UCSTestUDM cleanup...
Traceback (most recent call last):
  File "33_umc_users_user_unset_userexpiry", line 136, in <module>
    sys.exit(TestUMC.main())
  File "33_umc_users_user_unset_userexpiry", line 111, in main
    if response[0]["userexpiry"] != "2015-02-02":
KeyError: 'userexpiry'
UCSTestUDM cleanup done
*** END TIME: 2016-11-08 05:18:52 ***
*** TEST DURATION (H:MM:SS.ms): 0:00:09.413546 ***
*** END *** 1 ***
Comment 2 Florian Best univentionstaff 2016-11-08 14:47:25 CET
I would not say that this is a bug in the test case.

One way to produce this is:
ucr set directory/manager/web/modules/users/user/properties/userexpiry/syntax=password

But I guess that's not the cause.
Helpful would be a ldif of the user at this state.

My guess is that in some situations/state of the object the put (!) call returns with success while it didn't change anything (because UDM internally doesn't detect any change).
Comment 3 Florian Best univentionstaff 2016-11-10 14:15:51 CET
I couldn't reproduce this so I added some more debugging into the test case:

ucs-test (6.0.37-9):
r74229 | Bug #37924: add more debug output