Univention Bugzilla – Bug 56848
OX Connector cant't handle Context greater than 1215752191
Last modified: 2024-01-29 08:37:59 CET
Version: ox-connector=2.2.7 When a Context greater than 1215752191 is created the following error occur: ``` 2023-11-17 11:36:27 INFO Handling PosixPath('/var/lib/univention-appcenter/apps/ox-connector/data/listener/2023-11-15-23-32-38-719907.json') 2023-11-17 11:36:27 INFO Creating Object('oxmail/oxcontext', 'cn=99999999999,cn=open-xchange,dc=dev,dc=px2,dc=own-data,dc=org') 2023-11-17 11:36:28 INFO Error while processing /var/lib/univention-appcenter/apps/ox-connector/data/listener/2023-11-15-23-32-38-719907.json 2023-11-17 11:36:28 WARNING Traceback (most recent call last): 2023-11-17 11:36:28 WARNING File "/tmp/univention-ox-connector.listener_trigger", line 341, in run_on_files 2023-11-17 11:36:28 WARNING function(obj) 2023-11-17 11:36:28 WARNING File "/usr/lib/python3.9/site-packages/univention/ox/provisioning/__init__.py", line 69, in run 2023-11-17 11:36:28 WARNING create_context(obj) 2023-11-17 11:36:28 WARNING File "/usr/lib/python3.9/site-packages/univention/ox/provisioning/contexts.py", line 64, in create_context 2023-11-17 11:36:28 WARNING if context_exists(obj): 2023-11-17 11:36:28 WARNING File "/usr/lib/python3.9/site-packages/univention/ox/provisioning/contexts.py", line 59, in context_exists 2023-11-17 11:36:28 WARNING return bool(get_obj_by_name_from_ox(Context, context_id, None)) 2023-11-17 11:36:28 WARNING File "/usr/lib/python3.9/site-packages/univention/ox/provisioning/helpers.py", line 41, in get_obj_by_name_from_ox 2023-11-17 11:36:28 WARNING return klass.from_ox(context_id, name=name) 2023-11-17 11:36:28 WARNING File "/usr/lib/python3.9/site-packages/univention/ox/soap/backend.py", line 282, in from_ox 2023-11-17 11:36:28 WARNING soap_obj = context_service.get_data(context_obj) 2023-11-17 11:36:28 WARNING File "/usr/lib/python3.9/site-packages/univention/ox/soap/services.py", line 357, in get_data 2023-11-17 11:36:28 WARNING return self._call_ox('getData', ctx=context_obj, auth=self.credentials.master_credentials) 2023-11-17 11:36:28 WARNING File "/usr/lib/python3.9/site-packages/univention/ox/soap/services.py", line 163, in _call_ox 2023-11-17 11:36:28 WARNING return getattr(service, func)(**kwargs) 2023-11-17 11:36:28 WARNING File "/usr/lib/python3.9/site-packages/zeep/proxy.py", line 46, in __call__ 2023-11-17 11:36:28 WARNING return self._proxy._binding.send( 2023-11-17 11:36:28 WARNING File "/usr/lib/python3.9/site-packages/zeep/wsdl/bindings/soap.py", line 135, in send 2023-11-17 11:36:28 WARNING return self.process_reply(client, operation_obj, response) 2023-11-17 11:36:28 WARNING File "/usr/lib/python3.9/site-packages/zeep/wsdl/bindings/soap.py", line 229, in process_reply 2023-11-17 11:36:28 WARNING return self.process_error(doc, operation) 2023-11-17 11:36:28 WARNING File "/usr/lib/python3.9/site-packages/zeep/wsdl/bindings/soap.py", line 329, in process_error 2023-11-17 11:36:28 WARNING raise Fault( 2023-11-17 11:36:28 WARNING zeep.exceptions.Fault: Context 1215752191 does not exist; exceptionId -165183159-23074 2023-11-17 11:36:28 INFO This is consecutive error #20526 2023-11-17 11:36:28 INFO Sleeping for 0 sec 2023-11-17 11:36:28 INFO Successfully processed 0 files during this run ```
Actually, it is 4294967295: If you create a oxcontext with ID 999999999, the ox-connector - before creating the context - asks OX whether this context with that ID already exists. If not, the error message expected by the ox-connector is "Context 999999999 does not exist". But OX responds with Context 1215752191 does not exist. Why? Because 999999999 mod 4294967295 = 1215752191 We should not allow a context ID > int32.MAX As far as I know, this number does not exist in Python3. It would need to be hard coded into the syntax.
I saw this in a another environment. Would it be a feature request to prevent the oxmail/oxcontext creation in an syntax check?
The UDM syntax class "integer" does not support size limits. You either have to adapt the UDM syntax class and make the OX connector app depend on the UCS errata version or install a custom syntax class.