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

REST API jail/releases_choices with false return 'Dataset tank/iocage/releases not found'

    XMLWordPrintable

    Details

      Description

      Here is the error:

      def test_03_get_installed_FreeBSD_release_():
              results = POST('/jail/releases_choices/', False)
      >       assert results.status_code == 200, results.text
      E       AssertionError: {
      E          "message": "('Dataset tank/iocage/releases not found',)",
      E          "traceback": "concurrent.futures.process._RemoteTraceback: \n\"\"\"\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.7/concurrent/futures/process.py\", line 232, in _process_worker\n    r = call_item.fn(*call_item.args, **call_item.kwargs)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/worker.py\", line 105, in main_worker\n    res = loop.run_until_complete(coro)\n  File \"/usr/local/lib/python3.7/asyncio/base_events.py\", line 584, in run_until_complete\n    return future.result()\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/worker.py\", line 61, in _run\n    return await self._call(name, serviceobj, methodobj, params=args, job=job)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/worker.py\", line 53, in _call\n    return methodobj(*params)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/worker.py\", line 53, in _call\n    return methodobj(*params)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/schema.py\", line 952, in nf\n    return f(*args, **kwargs)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/plugins/jail.py\", line 596, in releases_choices\n    choices = {k: k for k in iocage.fetch(list=True, remote=remote, http=True)}\n  File \"/usr/local/lib/python3.7/site-packages/iocage_lib/iocage.py\", line 1158, in fetch\n    rel_list = self.list(\"base\")\n  File \"/usr/local/lib/python3.7/site-packages/iocage_lib/iocage.py\", line 1411, in list\n    silent=self.silent\n  File \"/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_list.py\", line 64, in list_datasets\n    ds = self.zfs.get_dataset(f\"{self.pool}/iocage/releases\").children\n  File \"libzfs.pyx\", line 915, in libzfs.ZFS.get_dataset\nlibzfs.ZFSException: Dataset tank/iocage/releases not found\n\"\"\"\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/restful.py\", line 528, in do\n    result = await self.middleware.call(methodname, *method_args)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/main.py\", line 1150, in call\n    app=app, pipes=pipes, job_on_progress_cb=job_on_progress_cb, io_thread=True,\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/main.py\", line 1089, in _call\n    return await self._call_worker(name, *args)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/main.py\", line 1109, in _call_worker\n    return await self.run_in_proc(main_worker, name, args, job)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/main.py\", line 1041, in run_in_proc\n    return await self.run_in_executor(self.__procpool, method, *args, **kwargs)\n  File \"/usr/local/lib/python3.7/site-packages/middlewared/main.py\", line 1015, in run_in_executor\n    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))\nlibzfs.ZFSException: ('Dataset tank/iocage/releases not found',)\n"
      E         }
      E       assert 500 == 200
      E        +  where 500 = <Response [500]>.status_code

      Jenkins test:

      https://builds.ixsystems.com/jenkins/view/QA%20Tests/view/All/job/FreeNAS%20-%20Master%20-%20Incremental%20API%20Tests/job/master/lastCompletedBuild/testReport/api2/jail/Run_Tests___API_2_0___test_03_get_installed_FreeBSD_release_/

      ISO: https://builds.ixsystems.com/jenkins/job/FreeNAS%20-%20Master%20-%20Incremental%20Build/lastSuccessfulBuild/artifact/artifacts/iso/FreeNAS-11.3-MASTER-201907100739-7bf55b33c.iso 

        Attachments

          Attachments

            JEditor

              Issue Links

                Activity

                  People

                  Assignee:
                  waqar Waqar Ahmed
                  Reporter:
                  eturgeon Eric Turgeon
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved: