Uploaded image for project: 'TrueNAS'
  1. TrueNAS
  2. NAS-107226

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

    XMLWordPrintable

    Details

    • Impact:
      Low

      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

        Attachments

          Attachments

            JEditor

              Activity

                People

                Assignee:
                vladimirv Vladimir Vinogradenko
                Reporter:
                gibmat Mathias Gibbens
                Watchers:
                Bonnie Follweiler, Bug Clerk, Mathias Gibbens, William Grzybowski
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: