Project

General

Profile

Bug #35635

Add error handler for entity-table getFunction to new UI

Added by Warren Block over 2 years ago. Updated about 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Lola Yang
Category:
GUI (new)
Target version:
Severity:
New
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

If the plugin server cannot be reached due to DNS or network issues, no errors or tracebacks are produced. The list of available plugins is just empty.

Steps to reproduce: set the FreeNAS network interface to a static address.
Do not set a default route or DNS servers.
Go to Plugins/Available Plugins in the UI.


Related issues

Related to FreeNAS - Feature #36063: Show exec=off error message when trying to load Available Plugins in the UIClosed

History

#1 Updated by Erin Clark over 2 years ago

  • Assignee changed from Erin Clark to Lola Yang

#2 Updated by Lola Yang over 2 years ago

  • Status changed from Unscreened to In Progress
  • Assignee changed from Lola Yang to Erin Clark

#3 Updated by Lola Yang about 2 years ago

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

#4 Updated by Dru Lavigne about 2 years ago

  • Subject changed from No error message when plugin server cannot be reached to Add error handler for entity-table getFunction to new UI
  • Assignee changed from Erin Clark to Lola Yang
  • Target version changed from Backlog to 11.2-BETA2

#5 Updated by Erin Clark about 2 years ago

  • Status changed from In Progress to Ready for Testing

#6 Updated by Dru Lavigne about 2 years ago

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

#7 Updated by Timothy Moore II about 2 years ago

Testing with FreeNAS Mini/System updated to FreeNAS-11.2-MASTER-201807160837:

Set WebUI network interface with DHCP and went to Plugins/Available to verify the system can see available plugins before setting it to not be able to find available plugins. This error appears on page load:

('/mnt/iocage/.plugin_index/.git/objects/pack/pack-da39a3ee5e6b4b0d3255bfef95601890afd80709.idx', '/mnt/iocage/.plugin_index/.git/objects/pack/pack-da39a3ee5e6b4b0d3255bfef95601890afd80709.idx.lock')

More info...
Error: concurrent.futures.process._RemoteTraceback: 
""" 
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_plugin.py", line 608, in fetch_plugin_index
    outstream=devnull, errstream=devnull)
  File "/usr/local/lib/python3.6/site-packages/dulwich/porcelain.py", line 306, in clone
    r = Repo.init(target)
  File "/usr/local/lib/python3.6/site-packages/dulwich/repo.py", line 1014, in init
    os.mkdir(controldir)
FileExistsError: [Errno 17] File exists: '/mnt/iocage/.plugin_index/.git'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/dulwich/file.py", line 126, in __init__
    getattr(os, "O_BINARY", 0))
FileExistsError: [Errno 17] File exists: '/mnt/iocage/.plugin_index/.git/objects/pack/pack-da39a3ee5e6b4b0d3255bfef95601890afd80709.idx.lock'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_plugin.py", line 613, in fetch_plugin_index
    outstream=devnull, errstream=devnull)
  File "/usr/local/lib/python3.6/site-packages/dulwich/porcelain.py", line 818, in pull
    path, r, progress=errstream.write, determine_wants=determine_wants)
  File "/usr/local/lib/python3.6/site-packages/dulwich/client.py", line 368, in fetch
    commit()
  File "/usr/local/lib/python3.6/site-packages/dulwich/client.py", line 354, in commit
    target.object_store.add_thin_pack(f.read, None)
  File "/usr/local/lib/python3.6/site-packages/dulwich/object_store.py", line 667, in add_thin_pack
    return self._complete_thin_pack(f, path, copier, indexer)
  File "/usr/local/lib/python3.6/site-packages/dulwich/object_store.py", line 634, in _complete_thin_pack
    index_file = GitFile(pack_base_name + '.idx', 'wb')
  File "/usr/local/lib/python3.6/site-packages/dulwich/file.py", line 88, in GitFile
    return _GitFile(filename, mode, bufsize)
  File "/usr/local/lib/python3.6/site-packages/dulwich/file.py", line 129, in __init__
    raise FileLocked(filename, self._lockfilename)
dulwich.file.FileLocked: ('/mnt/iocage/.plugin_index/.git/objects/pack/pack-da39a3ee5e6b4b0d3255bfef95601890afd80709.idx', '/mnt/iocage/.plugin_index/.git/objects/pack/pack-da39a3ee5e6b4b0d3255bfef95601890afd80709.idx.lock')

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 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 266, in list_resource
    header=False)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 885, in fetch
    icon=True, official=official)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_plugin.py", line 622, in fetch_plugin_index
    silent=self.silent)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_common.py", line 83, in logit
    _callback({"level": level, "message": msg}, exit_on_error)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_common.py", line 62, in callback
    raise RuntimeError(message)
RuntimeError: ('/mnt/iocage/.plugin_index/.git/objects/pack/pack-da39a3ee5e6b4b0d3255bfef95601890afd80709.idx', '/mnt/iocage/.plugin_index/.git/objects/pack/pack-da39a3ee5e6b4b0d3255bfef95601890afd80709.idx.lock')
""" 

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 977, in _call_worker
    job,
  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: ('/mnt/iocage/.plugin_index/.git/objects/pack/pack-da39a3ee5e6b4b0d3255bfef95601890afd80709.idx', '/mnt/iocage/.plugin_index/.git/objects/pack/pack-da39a3ee5e6b4b0d3255bfef95601890afd80709.idx.lock')

#8 Updated by Dru Lavigne about 2 years ago

  • Status changed from Ready for Testing to Failed Testing

#9 Updated by Timothy Moore II about 2 years ago

  • Status changed from Failed Testing to Ready for Testing

I updated the testing system to today's nightly (FreeNAS-11.2-MASTER-201807171249).

Configuring the webui interface and checking available plugins now works properly. I will continue the test and confirm forcing it to fail generates the proper error.

#10 Updated by Lola Yang about 2 years ago

Timothy Moore II wrote:

Testing with FreeNAS Mini/System updated to FreeNAS-11.2-MASTER-201807160837:

Set WebUI network interface with DHCP and went to Plugins/Available to verify the system can see available plugins before setting it to not be able to find available plugins. This error appears on page load:

[...]

If you can see these error message in a popup dialog, it means it works properly. The empty available plugins is caused by a middleware traceback.

#11 Updated by Lola Yang about 2 years ago

Timothy Moore II wrote:

I updated the testing system to today's nightly (FreeNAS-11.2-MASTER-201807171249).

Configuring the webui interface and checking available plugins now works properly. I will continue the test and confirm forcing it to fail generates the proper error.

Thanks Tim.

#12 Updated by Timothy Moore II about 2 years ago

  • Status changed from Ready for Testing to Failed Testing

Testing with FreeNAS Mini updated to FreeNAS-11.2-MASTER-201807171249

Work with Warren to reproduce this issue. Go directly to the console on the FreeNAS box and manually set the active NIC to a static IP with no default routes or DNS settings. Connect to the web UI at the static IP address. Go to Plugins/Available. The table says there is no data to display and no popup error appears.

Note: there appears to still be weirdness/unpredictable behavior when configuring network interfaces in the web ui vs. configuring interfaces directly in the serial console of the box.

#13 Updated by Timothy Moore II about 2 years ago

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

Spent additional time rechecking the test pathway and discussing the issue with Lola. One fresh start using the same test path later, and this appears when I go to Plugins/Available:

<urlopen error [Errno 8] hostname nor servname provided, or not known>

This is the correct output for the forced state I put the system into.

#14 Updated by Dru Lavigne about 2 years ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF