Project

General

Profile

Bug #53883

Fix traceback on first boot without jails/plugins

Added by William Grzybowski almost 2 years ago. Updated almost 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Seen in:
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

future: <Task finished coro=<__event_system() done, defined at /usr/local/lib/python3.7/site-packages/middlewared/plugins/jail.py:1004> exception=PoolNotActivated('Please specify a pool to activate with iocage activate POOL')>
concurrent.futures.process._RemoteTraceback: 
""" 
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_json.py", line 531, in json_get_value
    zpool = zpools[1]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/concurrent/futures/process.py", line 232, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 95, in main_worker
    res = loop.run_until_complete(coro)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 55, in _run
    return await self._call(f'{service_name}.{method}', serviceobj, methodobj, params=args, job=job)
  File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 48, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 48, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/jail.py", line 971, in start_on_boot
    ioc.IOCage(rc=True).start()
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/iocage.py", line 115, in __init__
    self.pool = PoolAndDataset().get_pool()
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/iocage.py", line 54, in __init__
    self.pool = ioc_json.IOCJson().json_get_value("pool")
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_json.py", line 541, in json_get_value
    exception=ioc_exceptions.PoolNotActivated)
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_common.py", line 85, in logit
    callback(content, exception)
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_common.py", line 66, in callback
    raise callback_exception(message)
iocage_lib.ioc_exceptions.PoolNotActivated: Please specify a pool to activate with iocage activate POOL
""" 

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/jail.py", line 1012, in __event_system
    await middleware.call('jail.start_on_boot')
  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1028, in call
    return await self._call(name, serviceobj, methodobj, params, app=app, pipes=pipes, io_thread=True)
  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 962, in _call
    return await self._call_worker(serviceobj, name, *args)
  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 988, in _call_worker
    job,
  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 920, in run_in_proc
    return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 905, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
iocage_lib.ioc_exceptions.PoolNotActivated: Please specify a pool to activate with iocage activate POOL

Acceptance Criteria
After a fresh install traceback above should not be shown in middlewared.log


Related issues

Copied to FreeNAS - Bug #54132: Fix traceback on first boot without jails/pluginsDone

Associated revisions

Revision 07c1354c (diff)
Added by William Grzybowski almost 2 years ago

fix(middlewared/jail): handle exception on boot without pools Ticket: #53883

Revision 4e156d77 (diff)
Added by William Grzybowski almost 2 years ago

fix(middlewared/jail): handle exception on boot without pools Ticket: #53883

Revision 70dfa0bd (diff)
Added by William Grzybowski almost 2 years ago

fix(middlewared/jail): handle exception on boot without pools Ticket: #53883 (cherry picked from commit 07c1354c9f7fc401c5ce701faf01ac892d0a3a87)

History

#1 Updated by Bug Clerk almost 2 years ago

  • Status changed from Not Started to In Progress

#2 Updated by Bug Clerk almost 2 years ago

  • Status changed from In Progress to Ready for Testing

#3 Updated by Bug Clerk almost 2 years ago

  • Target version changed from 11.2-RC2 to 11.3

#4 Updated by Bug Clerk almost 2 years ago

  • Copied to Bug #54132: Fix traceback on first boot without jails/plugins added

#5 Updated by Dru Lavigne almost 2 years ago

  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#6 Updated by Dru Lavigne almost 2 years ago

  • Status changed from Ready for Testing to Done
  • Target version changed from 11.3 to Master - FreeNAS Nightlies
  • Needs QA changed from Yes to No

Also available in: Atom PDF