Uploaded image for project: 'FreeNAS / TrueNAS'
  1. FreeNAS / TrueNAS
  2. NAS-101525

Improve iocage fstab validation

    XMLWordPrintable

    Details

    • Has Acceptance Criteria:
      Yes
    • Needs Doc:
      No
    • Needs QA:
      Yes
    • Attempts to pass:
      1
    • Testing System:
      FreeNAS Mini
    • QA Status:
      Test Passes FreeNAS
    • Acceptance Criteria:
      Steps in description should no longer result in a traceback.

      Description

      1. add mount point to the jail 
      2. disconnect disk/pool
      3. now you can't remove mount from jail : Source: /mnt/HDD01 does not exist!

      Error: concurrent.futures.process._RemoteTraceback: 
      """
      Traceback (most recent call last):
        File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 707, in fstab
          dump, _pass, index=index
        File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1037, in fstab
          index=index
        File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_fstab.py", line 69, in __init__
          self.dests = self.__validate_fstab__(self.fstab, 'all')
        File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_fstab.py", line 212, in __validate_fstab__
          exception=iocage_lib.ioc_exceptions.ValidationFailed
        File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 90, in logit
          _callback(content, exception)
        File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 64, in callback
          raise callback_exception(message)
      iocage_lib.ioc_exceptions.ValidationFailed: ['Source: /mnt/HDD01 does not exist!']

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
          r = call_item.fn(*call_item.args, **call_item.kwargs)
        File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 128, in main_worker
          res = loop.run_until_complete(coro)
        File "/usr/local/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
          return future.result()
        File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 88, in _run
          return await self._call(f'{service_name}.{method}', serviceobj, methodobj, params=args, job=job)
        File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
          return methodobj(*params)
        File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
          return methodobj(*params)
        File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
          return f(*args, **kwargs)
        File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 719, in fstab
          raise CallError(e.message)
      middlewared.service_exception.CallError: [EFAULT] Source: /mnt/HDD01 does not exist!
      """

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 165, in call_method
          result = await self.middleware.call_method(self, message)
        File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1141, in call_method
          return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
        File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1078, in _call
          return await self._call_worker(serviceobj, name, *args)
        File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1105, in _call_worker
          job,
        File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1036, in run_in_proc
          return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
        File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1021, in run_in_executor
          return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
      middlewared.service_exception.CallError: [EFAULT] Source: /mnt/HDD01 does not exist!

        Attachments

          Container Issues

            Attachments

              Issue Links

                Activity

                  People

                  • Assignee:
                    waqar Waqar Ahmed
                    Reporter:
                    mastras R D
                    QE Engineer:
                    Jeff Ervin
                  • Votes:
                    1 Vote for this issue
                    Watchers:
                    7 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved:
                      Merged after freeze:

                      Summary Panel