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

Fix bug that prevented updating iSCSI extent from disk to file

    XMLWordPrintable

    Details

      Description

      This issue is able to reproduce on 11.2 and 11.3.

      Method and payload

      "method":"iscsi.extent.update",
      "params":[  
            "31",
            {  
               "name":"test",
               "type":"FILE",
               "serial":"10000001",
               "path":"/mnt/entank/ds1/freenas/README.md",
               "filesize":"0",
               "blocksize":512,
               "pblocksize":false,
               "avail_threshold":null,
               "comment":"",
               "insecure_tpc":true,
               "xen":false,
               "rpm":"SSD",
               "ro":false
            }
         ]

       

      Response: 

       "error":{  
            "error":22,
            "type":null,
            "reason":"'disk'",
            "trace":{  
               "class":"KeyError",
               "frames":[....],
               "formatted":"Traceback (most recent call last):\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/main.py\", line 173, in call_method\n    result = await self.middleware.call_method(self, message)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/main.py\", line 1150, in call_method\n    return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/main.py\", line 1098, in _call\n    return await methodobj(*args)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/service.py\", line 368, in update\n    f'{self._config.namespace}.update', self, self.do_update, [id, data]\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/main.py\", line 1098, in _call\n    return await methodobj(*args)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/schema.py\", line 949, in nf\n    return await f(*args, **kwargs)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/plugins/iscsi.py\", line 595, in do_update\n    new, 'iscsi_extent_update', verrors, old=old\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/plugins/iscsi.py\", line 712, in clean\n    await self.clean_type_and_path(data, schema_name, verrors)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/plugins/iscsi.py\", line 741, in clean_type_and_path\n    disk = data['disk']\nKeyError: 'disk'\n"
            },
            "extra":null
         }

        Attachments

          Attachments

            JEditor

              Issue Links

                Activity

                  People

                  Assignee:
                  william William Grzybowski
                  Reporter:
                  lola Lola Yang (Inactive)
                  Watchers:
                  Bug Clerk, Lola Yang (Inactive)
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved: