Directory Services Validation error after update to 25.10

I just updated a system from 25.04.2.6 to 25.10.2 and tried to check the Directory Services configuration. I could not see or change the configuration, just received this error:

1 validation error for DirectoryServicesConfigResult
result.timeout
  Input should be less than or equal to 60 [type=less_than_equal, input_value=3000, input_type=int]
    For further information visit https://errors.pydantic.dev/2.9/v/less_than_equal
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py", line 361, in process_method_call
    result = await method.call(app, id_, params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py", line 69, in call
    return await self._dump_result(app, methodobj, result)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py", line 72, in _dump_result
    return self.middleware.dump_result(self.serviceobj, methodobj, app, result)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 864, in dump_result
    return serialize_result(new_style_returns_model, result, expose_secrets, self.dump_result_allow_fallback)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/api/base/handler/result.py", line 23, in serialize_result
    return model(result=result).model_dump(
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pydantic/main.py", line 212, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for DirectoryServicesConfigResult
result.timeout
  Input should be less than or equal to 60 [type=less_than_equal, input_value=3000, input_type=int]
    For further information visit https://errors.pydantic.dev/2.9/v/less_than_equal

I tried updating the timeout value by midclt call directoryservices.update '{"timeout": 60} but this does not seem to have worked - I still get the same error.

Any ideas, maybe @awalkerix ?

This is related to a backend bug that’s being fixed for a 25.10.2.1 hotfix.

1 Like

Sounds good, any way to update the timeout to 60 in the meantime? And any ETA on 25.10.2.1?
I would’ve patched the result.py file manually but I don’t want to enable developer mode just for that.

root@testUTVG0BGGTZ[~]# midclt call datastore.config directoryservices | jq
{
  "id": 1,
  "service_type": null,
  "cred_type": null,
  "cred_krb5": {},
  "cred_ldap_plain": {},
  "enable": false,
  "enable_account_cache": true,
  "enable_dns_updates": true,
  "timeout": 10,
  "ad_hostname": null,
  "ad_domain": null,
  "ad_idmap": {},
  "ad_site": null,
  "ad_computer_account_ou": null,
  "ad_use_default_domain": false,
  "ad_enable_trusted_domains": false,
  "ad_trusted_domains": [],
  "ipa_hostname": null,
  "ipa_domain": null,
  "ipa_target_server": null,
  "ipa_basedn": null,
  "ipa_smb_domain": {},
  "ipa_validate_certificates": true,
  "ldap_server_urls": [],
  "ldap_starttls": false,
  "ldap_basedn": null,
  "ldap_validate_certificates": true,
  "ldap_schema": null,
  "ldap_base_user": null,
  "ldap_base_group": null,
  "ldap_base_netgroup": null,
  "ldap_user_object_class": null,
  "ldap_user_name": null,
  "ldap_user_uid": null,
  "ldap_user_gid": null,
  "ldap_user_gecos": null,
  "ldap_user_home_directory": null,
  "ldap_user_shell": null,
  "ldap_shadow_last_change": null,
  "ldap_shadow_min": null,
  "ldap_shadow_max": null,
  "ldap_shadow_warning": null,
  "ldap_shadow_inactive": null,
  "ldap_shadow_expire": null,
  "ldap_group_object_class": null,
  "ldap_group_gid": null,
  "ldap_group_member": null,
  "ldap_netgroup_object_class": null,
  "ldap_netgroup_member": null,
  "ldap_netgroup_triple": null,
  "ldap_auxiliary_parameters": null,
  "cred_ldap_mtls_cert": null,
  "kerberos_realm": null
}
root@testUTVG0BGGTZ[~]# midclt call datastore.update directoryservices 1 '{"timeout": 30}'
1
root@testUTVG0BGGTZ[~]# midclt call datastore.config directoryservices | jq .timeout      
30

You have to pierce the datastore veil directly (bypasses validation) :slight_smile:

Thanks!
That call isn’t documented is it?
I’m currently trying to create a working update command for the timeout from it :sweat_smile:

It’s using a private API. Hence undocumented, and liable to change between versions. The correct response when encountering an issue that breaks for you on upgrade is generally to roll back and wait for a fix.

Understood
You couldn’t tell me the command to update the timeout to 60 in 25.10.2 then right (even in a private message :sweat_smile:)? The amount of work resulting from rebooting this machine is quite high.

root@testUTVG0BGGTZ[~]# midclt call datastore.update directoryservices 1 '{"timeout": 60}'
1

Thanks a lot!
UI and CLI working fine again.
Looking forward to 25.10.2.1 so I can update our other machines.