NAS-135936 / 25.10 / Catch ImportError in utils/threading.py (#16517)
Because of how python3-truenas-pylibzfs module operates, we need to
remove the build time dependency in debian/control and try to import the
module and catch `ImportError`. This allows the `middlewared` debian
package to successfully build.
NAS-135909 / 25.10 / add thread local storage to our thread pool (#16510)
This does a few things:
1. adds a thread local storage object to the threads in our thread pool
2. uses the newly added `truenas_pylibzfs` module to open a persistent
handle and store it in the thread-local storage for the threads in our
thread pool
3. adds a `pass_thread_local_storage` keyword argument to our
`api_method` decorator as well as adds a standalone decorator called
`@pass_thread_local_storage`.
4. adds a sub `Config` boolean attribute called
`pass_thread_local_storage`
This is the beginning steps of removing our process pool in favor of
using our thread pool for libzfs operations.
This behaves similar to how we decorate other methods or configure
plugins in middleware. The design works as follows:
1. if the sub `Config` object of a plugin has the boolean attribute
[4 lines not shown]