30 is not a valid PoolStatus

I get it when I go to Storage/Disks/ Edit drive and without doing anything get out. Then the GUI hangs for a few minutes.

Python stack trace
Error: concurrent.futures.process._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/concurrent/futures/process.py", line 246, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/worker.py", line 111, in main_worker
    res = MIDDLEWARE._run(*call_args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/worker.py", line 45, in _run
    return self._call(name, serviceobj, methodobj, args, job=job)
  File "/usr/local/lib/python3.9/site-packages/middlewared/worker.py", line 39, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.9/site-packages/middlewared/worker.py", line 39, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 985, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/zfs.py", line 87, in query
    pools = [i.__getstate__(**state_kwargs) for i in zfs.pools]
  File "libzfs.pyx", line 402, in libzfs.ZFS.__exit__
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/zfs.py", line 87, in query
    pools = [i.__getstate__(**state_kwargs) for i in zfs.pools]
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/zfs.py", line 87, in <listcomp>
    pools = [i.__getstate__(**state_kwargs) for i in zfs.pools]
  File "libzfs.pyx", line 2489, in libzfs.ZFSPool.__getstate__
  File "libzfs.pyx", line 2693, in libzfs.ZFSPool.healthy.__get__
  File "libzfs.pyx", line 2675, in libzfs.ZFSPool.status_code.__get__
  File "/usr/local/lib/python3.9/enum.py", line 384, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.9/enum.py", line 702, in __new__
    raise ve_exc
ValueError: 30 is not a valid PoolStatus
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 139, in call_method
    result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self)
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1240, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 981, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/disk.py", line 89, in query
    return await super().query(filters, options)
  File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 981, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/service.py", line 483, in query
    result = await self.middleware.call(
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1283, in call
    return await self._call(
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1240, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 981, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/datastore/read.py", line 164, in query
    result = await self._queryset_serialize(
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/datastore/read.py", line 208, in _queryset_serialize
    extend_context_value = await self.middleware.call(extend_context, extra_options)
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1283, in call
    return await self._call(
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1240, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/disk.py", line 136, in disk_extend_context
    for pool in await self.middleware.call('zfs.pool.query'):
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1283, in call
    return await self._call(
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1248, in _call
    return await self._call_worker(name, *prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1254, in _call_worker
    return await self.run_in_proc(main_worker, name, args, job)
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1173, in run_in_proc
    return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1156, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
ValueError: 30 is not a valid PoolStatus

EDIT: The above is also in middleware.log and is preceded by

(ERROR) EtcService.generate():436 - Failed to render py:ctld

Which version of TrueNAS is this and under what OS was the pool created? That ZFS pool error is ZPOOL_STATUS_COMPATIBILITY_ERR.

This is the latest CORE - TrueNAS-13.0-U6.1 (6bf2413add)
The pool was created back in 2020

root@freenas[~]# zpool history foo | grep feature
2020-10-13.15:12:10 zpool create -o feature@lz4_compress=enabled -o altroot=/mnt -o cachefile=/data/zfs/zpool.cache -o failmode=continue -o autoexpand=on -o feature@async_destroy=enabled -o feature@empty_bpobj=enabled -o feature@multi_vdev_crash_dump=enabled -o feature@spacemap_histogram=enabled -o feature@enabled_txg=enabled -o feature@hole_birth=enabled -o feature@extensible_dataset=enabled -o feature@embedded_data=enabled -o feature@bookmarks=enabled -o feature@filesystem_limits=enabled -o feature@large_blocks=enabled -o feature@sha512=enabled -o feature@skein=enabled -o feature@device_removal=enabled -o feature@obsolete_counts=enabled -o feature@zpool_checkpoint=enabled -o feature@spacemap_v2=enabled -O compression=lz4 -O aclmode=passthrough -O aclinherit=passthrough -O mountpoint=/foo foo raidz2 /dev/gptid/5f24dd27-0d90-11eb-9cdc-d05099dc8f1d /dev/gptid/5f287f9f-0d90-11eb-9cdc-d05099dc8f1d /dev/gptid/5f7adb67-0d90-11eb-9cdc-d05099dc8f1d /dev/gptid/5f7e59bf-0d90-11eb-9cdc-d05099dc8f1d /dev/gptid/5f813b43-0d90-11eb-9cdc-d05099dc8f1d