Project

General

Profile

Feature #31402

Fix iocage traceback when DNS server not found

Added by Lola Yang over 1 year ago. Updated about 1 year ago.

Status:
Done
Priority:
Important
Assignee:
Brandon Schneider
Category:
Middleware
Target version:
Estimated time:
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:

Description

Sometimes an error message like follows returned when trying to install a plugin.
```
Error: 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 116, in main_worker
res = loop.run_until_complete(coro)
File "/usr/local/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete
return future.result()
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 75, in _call
return methodobj(*args)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 75, in _call
return methodobj(*args)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 543, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 202, in fetch
iocage.fetch(
*options)
File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 964, in fetch
props, accept_license=accept)
File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_plugin.py", line 676, in fetch_plugin_index
props, 0, accept_license)
File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_plugin.py", line 124, in fetch_plugin
_conf, pkg, props, repo_dir)
File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_plugin.py", line 453, in fetch_plugin_install_packages
uuid, jaildir, _conf, repo=conf["packagesite"], site=repo_name)
File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_create.py", line 507, in create_install_packages
raise RuntimeError(f"{srv_connection}\n"
RuntimeError:
Command run: drill _http._tcp.http://pkg.cdn.trueos.org/iocage SRV
"""

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/job.py", line 325, in run
await self.future
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/job.py", line 346, in _run_body
rv = await self.middleware._call_worker(self.serviceobj, self.method_name, *self.args, job={'id': self.id})
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 943, in _call_worker
job,
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 878, 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 128, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 872, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
RuntimeError:
Command run: drill _http._tcp.http://pkg.cdn.trueos.org/iocage SRV
```
Can we have a nicer error message? it can be parsed and tell the user that the server couldn't be reached at this time, try again later or something. Thanks


Related issues

Copied to FreeNAS - Bug #34732: Fix iocage traceback with invalid DNS server being supplied. Closed

History

#1 Updated by Lola Yang over 1 year ago

  • Tracker changed from Bug to Feature
  • Seen in deleted (11.2-RC2)
  • ChangeLog Required deleted (No)

#2 Updated by Dru Lavigne over 1 year ago

  • Target version set to 11.2-RC2

#3 Updated by Brandon Schneider over 1 year ago

  • Status changed from Unscreened to Screened
  • Severity set to Low

#4 Updated by Brandon Schneider over 1 year ago

  • Status changed from Screened to Not Started

#5 Updated by Brandon Schneider over 1 year ago

  • Status changed from Not Started to Done

#6 Updated by Brandon Schneider over 1 year ago

  • Needs Merging changed from Yes to No

#7 Updated by Dru Lavigne over 1 year ago

  • Subject changed from A nicer error message from iocage to Fix iocage traceback when DNS server not found
  • Target version changed from 11.2-RC2 to 11.2-BETA1
  • Needs Doc changed from Yes to No

#8 Updated by Dru Lavigne about 1 year ago

  • Status changed from Done to Ready for Testing

#9 Avatar?id=55038&size=24x24 Updated by Zackary Welch about 1 year ago

  • File messages2.txt added

I tested this by going to install a plugin and changing the DNS server to something nonsensical during install. I'm not getting the same errors that Lola found, but I am getting some errors I've attached. I'd say this issue is still not fixed, because I didn't see any nice errors about the DNS server or whatever and still saw mostly nasty traceback. This also leads to a separate issue, as the UI still shows the plugin as installing ("Please wait") while the plugin cannot install. There should be a way to cancel the installation if this occurs.

#10 Updated by Dru Lavigne about 1 year ago

  • Status changed from Ready for Testing to Failed Testing

#11 Updated by Brandon Schneider about 1 year ago

That's a different error. This was for timing out on a valid but non-functional dns. Zach's I would say is a related but separate issue.

#12 Updated by Dru Lavigne about 1 year ago

  • Copied to Bug #34732: Fix iocage traceback with invalid DNS server being supplied. added

#13 Updated by Dru Lavigne about 1 year ago

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

#14 Updated by Dru Lavigne about 1 year ago

  • File deleted (messages2.txt)

Also available in: Atom PDF