Project

General

Profile

Bug #34810

Display an error if user trys to install a plugin on a dataset configured with noexec

Added by Vladimir Vinogradenko 10 months ago. Updated 10 months ago.

Status:
Done
Priority:
No priority
Assignee:
Vladimir Vinogradenko
Category:
Middleware
Target version:
Severity:
Low
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


Related issues

Related to FreeNAS - Feature #24283: Add "exec" property to dataset configuration screenDone
Related to FreeNAS - Feature #36063: Show exec=off error message when trying to load Available Plugins in the UIClosed

Associated revisions

Revision 0dc482c2 (diff)
Added by Dru Lavigne 10 months ago

Doc ramification of setting noexec.
Ticket: #34810

Revision 4c500977 (diff)
Added by Dru Lavigne 10 months ago

Doc ramification of setting noexec.
Ticket: #34810

History

#1 Updated by Dru Lavigne 10 months ago

  • Assignee changed from Release Council to William Grzybowski

#2 Updated by Dru Lavigne 10 months ago

  • Related to Feature #24283: Add "exec" property to dataset configuration screen added

#3 Updated by William Grzybowski 10 months ago

  • Assignee changed from William Grzybowski to Brandon Schneider
  • Severity changed from New to Low

This is very low priority, perhaps create we can create a ticket for libiocage and handle it down the road from middleware.

#4 Updated by Vladimir Vinogradenko 10 months ago

  • Status changed from Unscreened to In Progress
  • Assignee changed from Brandon Schneider to Vladimir Vinogradenko
  • Needs QA changed from Yes to No

William, already handled

#5 Updated by William Grzybowski 10 months ago

Vladimir Vinogradenko wrote:

William, already handled

Where is the PR?

This need may need to be handled in new iocage rewrite as well.

#6 Updated by Vladimir Vinogradenko 10 months ago

https://github.com/iocage/iocage/pull/566

Is this new iocage rewrite?

#7 Updated by Brandon Schneider 10 months ago

It's fine there Vladimir.

#8 Updated by Vladimir Vinogradenko 10 months ago

  • Status changed from In Progress to Ready for Testing

#9 Updated by Dru Lavigne 10 months ago

  • Subject changed from IndexError when calling jail.fetch when dataset is noexec to Display an error if user trys to install a plugin on a dataset configured with noexec
  • Needs QA changed from No to Yes
  • Needs Merging changed from Yes to No

#10 Updated by Dru Lavigne 10 months ago

  • Target version changed from Backlog to 11.2-BETA1

#12 Avatar?id=55038&size=24x24 Updated by Zackary Welch 10 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

I cannot reproduce the error because Avilalbe Plugins will not load when exec=off. There is no error message about this. The traceback in middlewared.log is:

2018/06/27 19:00:39] (WARNING) application.call_method():181 - Exception while calling
jail.list_resource(*['PLUGIN', True])
concurrent.futures.process._RemoteTraceback:
""" 
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 122, 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 82, 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 75, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 75, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 662, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 246, in list_resource
    self.check_dataset_existence()  # Make sure our datasets exist.
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 193, in check_dataset$
    IOCCheck()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_check.py", line 44, in __init__
    self.__check_datasets__()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_check.py", line 119, in __check_datasets__
    _callback=self.callback)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_common.py", line 82, in logit
    _callback({"level": level, "message": msg}, exit_on_error)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_common.py", line 61, in callback
    raise RuntimeError(message)
RuntimeError: Dataset "iocage" has exec=off (should be on)
""" 

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 154, in call_method
    result = await self.middleware.call_method(self, message)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
    return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1013, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
    return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 950, in _call
    return await self._call_worker(serviceobj, name, *args)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
   return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 908, in run_in_proc
    return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
    return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 902, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
RuntimeError: Dataset "iocage" has exec=off (should be on)

#13 Avatar?id=55038&size=24x24 Updated by Zackary Welch 10 months ago

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

#14 Updated by Brandon Schneider 10 months ago

That is the error Zach. If you were running this from the cli, you would see a nice error. But in the logs it will throw a RuntimeError.

#15 Updated by Dru Lavigne 10 months ago

  • Status changed from Failed Testing to Ready for Testing

#16 Avatar?id=55038&size=24x24 Updated by Zackary Welch 10 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

Sorry, I was confused because the error occurred no when installing the plugin but when loading the list of available plugins. When using the CLI the nice error appears. This should probably be in the UI and I might make a separate, related ticket for that. This ticket is done though.

#17 Avatar?id=55038&size=24x24 Updated by Zackary Welch 10 months ago

  • Status changed from Passed Testing to Done

#18 Updated by Dru Lavigne 10 months ago

  • Status changed from Done to Passed Testing

#19 Avatar?id=55038&size=24x24 Updated by Zackary Welch 10 months ago

  • Related to Feature #36063: Show exec=off error message when trying to load Available Plugins in the UI added

#20 Updated by Dru Lavigne 10 months ago

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

Also available in: Atom PDF