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

create and extent with wilt API test failed with 500

    XMLWordPrintable

Details

    Description

      Here is the error from the last SCALE incremental API test.

      Error Message
      
      AssertionError: {    "message": "'disk'",    "traceback": "Traceback (most recent call last):\n  File \"/usr/lib/python3/dist-packages/middlewared/restful.py\", line 573, in do\n    result = await self.middleware.call(methodname, *method_args, **method_kwargs)\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1239, in call\n    return await self._call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1196, in _call\n    return await methodobj(*prepared_call.args)\n  File \"/usr/lib/python3/dist-packages/middlewared/service.py\", line 501, in create\n    rv = await self.middleware._call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1196, in _call\n    return await methodobj(*prepared_call.args)\n  File \"/usr/lib/python3/dist-packages/middlewared/schema.py\", line 1001, in nf\n    return await f(*args, **kwargs)\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/iscsi.py\", line 580, in do_create\n    data['id'] = await self.middleware.call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1239, in call\n    return await self._call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1196, in _call\n    return await methodobj(*prepared_call.args)\n  File \"/usr/lib/python3/dist-packages/middlewared/schema.py\", line 1001, in nf\n    return await f(*args, **kwargs)\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/write.py\", line 22, in insert\n    insert, relationships = self._extract_relationships(table, options['prefix'], data)\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/write.py\", line 95, in _extract_relationships\n    insert[self._get_col(table, k, prefix).name] = v\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/schema.py\", line 23, in _get_col\n    raise KeyError(name)\nKeyError: 'disk'\n"   } assert 500 == 200   -500   +200
      
      Stacktrace
      
      request = <FixtureRequest for <Function test_04_Add_a_iSCSI_file_extent>>
      
          @pytest.mark.dependency(name="iscsi_04")
          def test_04_Add_a_iSCSI_file_extent(request):
              depends(request, ["pool_04", "iscsi_03"], scope="session")
              global extent_id
              payload = {
                  'type': 'FILE',
                  'name': 'extent',
                  'filesize': 536870912,
                  'path': f'/mnt/{pool_name}/dataset03/iscsi'
              }
              results = POST("/iscsi/extent/", payload)
      >       assert results.status_code == 200, results.text
      E       AssertionError: {
      E          "message": "'disk'",
      E          "traceback": "Traceback (most recent call last):\n  File \"/usr/lib/python3/dist-packages/middlewared/restful.py\", line 573, in do\n    result = await self.middleware.call(methodname, *method_args, **method_kwargs)\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1239, in call\n    return await self._call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1196, in _call\n    return await methodobj(*prepared_call.args)\n  File \"/usr/lib/python3/dist-packages/middlewared/service.py\", line 501, in create\n    rv = await self.middleware._call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1196, in _call\n    return await methodobj(*prepared_call.args)\n  File \"/usr/lib/python3/dist-packages/middlewared/schema.py\", line 1001, in nf\n    return await f(*args, **kwargs)\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/iscsi.py\", line 580, in do_create\n    data['id'] = await self.middleware.call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1239, in call\n    return await self._call(\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1196, in _call\n    return await methodobj(*prepared_call.args)\n  File \"/usr/lib/python3/dist-packages/middlewared/schema.py\", line 1001, in nf\n    return await f(*args, **kwargs)\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/write.py\", line 22, in insert\n    insert, relationships = self._extract_relationships(table, options['prefix'], data)\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/write.py\", line 95, in _extract_relationships\n    insert[self._get_col(table, k, prefix).name] = v\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/schema.py\", line 23, in _get_col\n    raise KeyError(name)\nKeyError: 'disk'\n"
      E         }
      E       assert 500 == 200
      E         -500
      E         +200
      
      api2/test_260_iscsi.py:94: AssertionError

       

      Attachments

        Attachments

          JEditor

            Issue Links

              Activity

                People

                  vladimirv Vladimir Vinogradenko
                  eturgeon Eric Turgeon
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                    Created:
                    Updated:
                    Resolved: