Project

General

Profile

Bug #34732

Fix iocage traceback with invalid DNS server being supplied.

Added by Dru Lavigne almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Important
Assignee:
Brandon Schneider
Category:
Middleware
Target version:
Severity:
Low
Reason for Closing:
Cannot Reproduce
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

File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_plugin.py", line 607, 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/ZPool/iocage/.plugin_index/.git'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/urllib/request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/local/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/usr/local/lib/python3.6/http/client.py", line 1392, in connect
super().connect()
File "/usr/local/lib/python3.6/http/client.py", line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/local/lib/python3.6/socket.py", line 704, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/local/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] hostname nor servname provided, or not known

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 612, 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 363, in fetch
progress)
File "/usr/local/lib/python3.6/site-packages/dulwich/client.py", line 1398, in fetch_pack
b"git-upload-pack", url)
File "/usr/local/lib/python3.6/site-packages/dulwich/client.py", line 1282, in _discover_references
resp, read = self._http_request(url, headers, allow_compression=True)
File "/usr/local/lib/python3.6/site-packages/dulwich/client.py", line 1261, in _http_request
resp = self.opener.open(req)
File "/usr/local/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/usr/local/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.6/urllib/request.py", line 1361, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/local/lib/python3.6/urllib/request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 8] hostname nor servname provided, or not known>

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 119, 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 79, 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 72, in _call
return methodobj(*params)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 72, in _call
return methodobj(*params)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 650, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 242, 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 621, in fetch_plugin_index
silent=self.silent)
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: <urlopen error [Errno 8] hostname nor servname provided, or not known>
"""

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 1014, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app)
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 978, 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: <urlopen error [Errno 8] hostname nor servname provided, or not known


Related issues

Copied from FreeNAS - Feature #31402: Fix iocage traceback when DNS server not foundDone

History

#1 Updated by Dru Lavigne almost 2 years ago

  • Copied from Feature #31402: Fix iocage traceback when DNS server not found added

#2 Updated by Brandon Schneider almost 2 years ago

  • Subject changed from Fix iocage traceback to Fix iocage traceback with invalid DNS server being supplied.
  • Status changed from Unscreened to Not Started

#3 Updated by Brandon Schneider almost 2 years ago

  • Status changed from Not Started to In Progress

#4 Updated by Brandon Schneider almost 2 years ago

  • Status changed from In Progress to Blocked
  • Reason for Blocked set to Need additional information from Author

I messaged Zack for clearer reproduction steps, as is I cannot reproduce.

#5 Avatar?id=55038&size=24x24 Updated by Zackary Welch almost 2 years ago

  • Reason for Closing set to Cannot Reproduce
  • Reason for Blocked deleted (Need additional information from Author)
  • Needs QA changed from Yes to No

I cannot reproduce this. I think I managed to change the DNS service via ssh during plugin install or something. I doubt this will occur again.

#6 Updated by Dru Lavigne almost 2 years ago

  • File deleted (messages2.txt)

#7 Updated by Dru Lavigne almost 2 years ago

  • Status changed from Blocked to Closed
  • Target version changed from 11.2-RC2 to N/A

#8 Updated by John Ramsden over 1 year ago

This is occurring for me on 11.2 both in the UI and on the commandline.

My DNS server is correct from what I can tell, and my jails have been working on 11.1 where I never got this message before.

I got the following on upgrading iocage jails:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/urllib/request.py", line 1318, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1026, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.6/http/client.py", line 964, in send
    self.connect()
  File "/usr/local/lib/python3.6/http/client.py", line 1392, in connect
    super().connect()
  File "/usr/local/lib/python3.6/http/client.py", line 936, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/local/lib/python3.6/socket.py", line 704, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/local/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 4] Non-recoverable failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 10, in <module>
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/iocage_cli/upgrade.py", line 39, in cli
    ioc.IOCage(jail=jail, skip_jails=True).upgrade(release)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1827, in upgrade
    root_path).upgrade_jail()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_upgrade.py", line 99, in upgrade_jail
    with urllib.request.urlopen(f) as fbsd_update:
  File "/usr/local/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/usr/local/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.6/urllib/request.py", line 1361, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/local/lib/python3.6/urllib/request.py", line 1320, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 4] Non-recoverable failure in name resolution>

#9 Updated by Dru Lavigne over 1 year ago

John: please create a new ticket that includes your debug (System -> Advanced -> Save debug).

Also available in: Atom PDF