Project

General

Profile

Bug #35344

Fix bad destroy target for iocage export

Added by Waqar Ahmed 10 months ago. Updated 9 months ago.

Status:
Done
Priority:
No priority
Assignee:
Brandon Schneider
Category:
Middleware
Target version:
Severity:
Low Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

The steps I took to produce the issue were as follows:
1) I created a Jail with DHCP on - ( exact command --> iocage create -r 11.0-RELEASE --name jail1 dhcp=on vnet=on bpf=yes )
2) I started the jail from command line
3) I updated it from the ui ( this I think calls the update to latest patch function )
4) Then I exported it ( it worked this time )
5) Then I made an update call with specifying the release to be 11.1-RELEASE
6) I tried exporting again and got the following traceback

[{'arguments': ['jail1'],
  'error': 'Worker call raised SystemExit exception',
  'exception': 'concurrent.futures.process._RemoteTraceback: \n'
               '"""\n'
               'Traceback (most recent call last):\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_image.py", '
               'line 62, in export_jail\n'
               '    ["zfs", "snapshot", "-r", target], stderr=su.STDOUT)\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_common.py", '
               'line 450, in checkoutput\n'
               '    out = su.check_output(*args, **kwargs)\n'
               '  File "/usr/local/lib/python3.6/subprocess.py", line 336, in '
               'check_output\n'
               '    **kwargs).stdout\n'
               '  File "/usr/local/lib/python3.6/subprocess.py", line 418, in '
               'run\n'
               '    output=stdout, stderr=stderr)\n'
               "subprocess.CalledProcessError: Command '['zfs', 'snapshot', " 
               "'-r', 'j_root/iocage/jails/jail1@ioc-export-2018-06-19']' " 
               'returned non-zero exit status 1.\n'
               '\n'
               'During handling of the above exception, another exception '
               'occurred:\n'
               '\n'
               'Traceback (most recent call last):\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/worker.py", '
               'line 119, in main_worker\n'
               '    res = loop.run_until_complete(coro)\n'
               '  File "/usr/local/lib/python3.6/asyncio/base_events.py", line '
               '455, in run_until_complete\n'
               '    self.run_forever()\n'
               '  File "/usr/local/lib/python3.6/asyncio/base_events.py", line '
               '422, in run_forever\n'
               '    self._run_once()\n'
               '  File "/usr/local/lib/python3.6/asyncio/base_events.py", line '
               '1432, in _run_once\n'
               '    handle._run()\n'
               '  File "/usr/local/lib/python3.6/asyncio/events.py", line 145, '
               'in _run\n'
               '    self._callback(*self._args)\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/worker.py", '
               'line 79, in _run\n'
               "    return await self._call(f'{service_name}.{method}', " 
               'serviceobj, methodobj, params=args, job=job)\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/worker.py", '
               'line 72, in _call\n'
               '    return methodobj(*params)\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/worker.py", '
               'line 72, in _call\n'
               '    return methodobj(*params)\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/schema.py", '
               'line 650, in nf\n'
               '    return f(*args, **kwargs)\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", '
               'line 468, in export\n'
               '    IOCImage().export_jail(uuid, path)\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_image.py", '
               'line 72, in export_jail\n'
               '    silent=self.silent)\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_common.py", '
               'line 82, in logit\n'
               '    _callback({"level": level, "message": msg}, '
               'exit_on_error)\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_common.py", '
               'line 64, in callback\n'
               '    raise SystemExit(1)\n'
               'SystemExit: 1\n'
               '\n'
               'During handling of the above exception, another exception '
               'occurred:\n'
               '\n'
               'Traceback (most recent call last):\n'
               '  File '
               '"/usr/local/lib/python3.6/concurrent/futures/process.py", line '
               '175, in _process_worker\n'
               '    r = call_item.fn(*call_item.args, **call_item.kwargs)\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/worker.py", '
               'line 121, in main_worker\n'
               "    raise RuntimeError('Worker call raised SystemExit " 
               "exception')\n" 
               'RuntimeError: Worker call raised SystemExit exception\n'
               '"""\n'
               '\n'
               'The above exception was the direct cause of the following '
               'exception:\n'
               '\n'
               'Traceback (most recent call last):\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/job.py", '
               'line 332, in run\n'
               '    await self.future\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/job.py", '
               'line 356, in __run_body\n'
               '    rv = await self.middleware._call_worker(self.serviceobj, '
               "self.method_name, *self.args, job={'id': self.id})\n" 
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/main.py", '
               'line 977, in _call_worker\n'
               '    job,\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/main.py", '
               'line 908, in run_in_proc\n'
               '    return await self.run_in_executor(self.__procpool, method, '
               '*args, **kwargs)\n'
               '  File '
               '"/usr/local/lib/python3.6/site-packages/middlewared/main.py", '
               'line 902, in run_in_executor\n'
               '    return await loop.run_in_executor(pool, '
               'functools.partial(method, *args, **kwargs))\n'
               'RuntimeError: Worker call raised SystemExit exception\n',
  'id': 434,
  'logs_excerpt': None,
  'logs_path': None,
  'method': 'jail.export',
  'progress': {'description': None, 'extra': None, 'percent': None},
  'result': None,
  'state': 'FAILED',
  'time_finished': {'$date': 1529424946382},
  'time_started': {'$date': 1529424944015}}]

Related issues

Related to FreeNAS - Bug #34870: Add APIv2 tests for JailsDone
Related to FreeNAS - Bug #37443: Sync with iocage upstream 07/10/2018Done

History

#1 Updated by Waqar Ahmed 10 months ago

  • Related to Bug #34870: Add APIv2 tests for Jails added

#2 Updated by Brandon Schneider 10 months ago

  • Status changed from Unscreened to Not Started
  • Severity changed from New to Low Medium

#3 Updated by Brandon Schneider 10 months ago

  • Status changed from Not Started to In Progress

#4 Updated by Brandon Schneider 10 months ago

  • Needs Merging changed from Yes to No

Fixed in https://github.com/iocage/iocage/commit/71dff6e95a88c022605cc50396703cf7eb582dc9, will be in our tree when the freeze is over

#6 Updated by Brandon Schneider 9 months ago

  • Related to Bug #37443: Sync with iocage upstream 07/10/2018 added

#7 Updated by Brandon Schneider 9 months ago

  • Status changed from In Progress to Ready for Testing

#8 Updated by Dru Lavigne 9 months ago

  • Subject changed from Jail export fails to Fix bad destroy target for iocage export
  • Target version changed from 11.2-RC2 to 11.2-BETA2
  • Needs Doc changed from Yes to No

#9 Updated by Aaron St. John 9 months ago

  • Status changed from Ready for Testing to Passed Testing

For the method of testing I did exactly what the user outlined.
1. I created the jail with the exact command used by the user.
2. I then started the jail from the command line.
3. Updated it from the UI.
4. Stopped the jail from the command line (had to stop it in order to export it)
5. Exported it with iocage export jail1
6. I then upgraded it to 11.1-RELEASE
7. Exported it again.

No error message. Everything seemed to work properly.

#10 Updated by Dru Lavigne 9 months ago

  • Status changed from Passed Testing to Done
  • Needs QA changed from Yes to No

Also available in: Atom PDF