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

Reset MTU to 1500 if MTU is cleared

    XMLWordPrintable

Details

    • Bug
    • Status: Done (View Workflow)
    • Low
    • Resolution: Complete
    • 11.3-RC1
    • 11.3-RC2
    • WebUI
    • None

    Description

      Problem:

      • In Network -> Interfaces -> Edit, blanking out the MTU setting results in a "not an interger" error.

       

      Steps to replicate:

      1. Go to Network -> Interfaces and edit any interface.
      2. Enter a number in the MTU section (such as 9000).
      3. Click Apply.
      4. Go back to the Edit screen for that same interface.
      5. Delete the number that you had previously inputted. Leave it blank.
      6. Click Apply. Error will be observed.

       

      Expected behavior:

      • When clearing out the MTU setting in an interface and leaving it blank, it should return the MTU setting to default (1500) without giving an error.

       

      Error: Traceback (most recent call last):
        File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 128, in call_method
          result = await self.middleware.call_method(self, message)
        File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1113, in call_method
          return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
        File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1061, in _call
          return await methodobj(*args)
        File "/usr/local/lib/python3.7/site-packages/middlewared/service.py", line 403, in update
          f'{self._config.namespace}.update', self, self.do_update, [id, data]
        File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1061, in _call
          return await methodobj(*args)
        File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 948, in nf
          args, kwargs = clean_and_validate_args(args, kwargs)
        File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 906, in clean_and_validate_args
          value = attr.clean(args[args_index + i])
        File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 594, in clean
          data[key] = attr.clean(value)
        File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 400, in clean
          raise Error(self.name, 'Not an integer')
      middlewared.schema.Error: [mtu] Not an integer
       

      Attachments

        Attachments

          JEditor

            Activity

              People

                erin Erin Clark
                xstylus Troy Williams
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: