Thanks for using the TrueNAS Community Edition issue tracker! TrueNAS Enterprise users receive direct support for their reports from our support portal.

middlewared_truenas/plugins/enclosure_/map.py TypeError line 66

Description

Upgraded to TrueNAS 12.0-BETA2, and am getting the following traceback. Very similar to https://jira.ixsystems.com/browse/NAS-106998 . I'd suggest maybe grepping through all the code to find instances of trying to use a non-existent dictionary key ("system_product").

[2020/08/14 14:55:23] (ERROR) middlewared.call_hook():1078 - Failed to run hook devd.devfs:<function devd_devfs_hook at 0x81ae4eaf0>(*(), **{'data': {'system': 'DEVFS', 'subsystem': 'CDEV', 'type': 'CREATE', 'cdev': 'ada4'}})
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1074, in call_hook
await fut
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/disk_/disk_events.py", line 40, in devd_devfs_hook
await added_disk(middleware, data['cdev'])
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/disk_/disk_events.py", line 13, in added_disk
await middleware.call('disk.sync', disk_name)
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1233, in call
return await self._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1191, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 973, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/disk_/sync.py", line 61, in sync
await self.middleware.call('enclosure.sync_disk', disk['disk_identifier'])
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1233, in call
return await self._call(
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1202, in _call
return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1106, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
File "/usr/local/lib/python3.8/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/middlewared_truenas/plugins/enclosure.py", line 201, in sync_disk
enclosure, element = self._get_slot_for_disk(disk["name"])
File "/usr/local/lib/middlewared_truenas/plugins/enclosure.py", line 149, in _get_slot_for_disk
return self._get_slot(lambda element: element["data"]["Device"] == disk)
File "/usr/local/lib/middlewared_truenas/plugins/enclosure.py", line 137, in _get_slot
for enclosure in self.middleware.call_sync("enclosure.query", enclosure_query or []):
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1260, in call_sync
return methodobj(*prepared_call.args)
File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 977, in nf
return f(*args, **kwargs)
File "/usr/local/lib/middlewared_truenas/plugins/enclosure.py", line 109, in query
enclosures = self.middleware.call_sync("enclosure.map_enclosures", enclosures)
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1249, in call_sync
return self.run_coroutine(methodobj(*prepared_call.args))
File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1289, in run_coroutine
return fut.result()
File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
raise self._exception
File "/usr/local/lib/middlewared_truenas/plugins/enclosure_/map.py", line 66, in map_enclosures
if product_mapping.product_re.match(info["system_product"]):
TypeError: expected string or bytes-like object

Problem/Justification

None

Impact

None

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

Bug Clerk August 18, 2020 at 11:17 AM

Bug Clerk August 17, 2020 at 7:44 PM

Bonnie Follweiler August 14, 2020 at 7:43 PM

Thank you for the report .  Can you please provide a debug by navigating to System -> Advanced, click save debug, and upload attachment to this ticket?

Complete

Details

Assignee

Reporter

Labels

Impact

Low

Components

Affects versions

Priority

More fields

Katalon Platform

Created August 14, 2020 at 3:10 PM
Updated July 1, 2022 at 4:55 PM
Resolved August 18, 2020 at 11:17 AM

Flag notifications