Page MenuHomeVyOS Platform

CLI backtrace on update if DNS not defined
Closed, ResolvedPublicBUG

Description

If DNS is not configured and on trying to update VyOS, CLI show a backtrace

vyos@vyos:~$ add system image https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso
Trying to fetch ISO file from https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso...
Failed to download https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso.
Traceback (most recent call last):
  File "/usr/lib/python3.9/urllib/request.py", line 1346, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.9/http/client.py", line 1255, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1301, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1250, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1010, in _send_output
    self.send(msg)
  File "/usr/lib/python3.9/http/client.py", line 950, in send
    self.connect()
  File "/usr/lib/python3.9/http/client.py", line 1417, in connect
    super().connect()
  File "/usr/lib/python3.9/http/client.py", line 921, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.9/socket.py", line 822, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
Failed to download the ISO file.
Exiting...

Additional information

vyos@vyos:~$ show configuration commands | match name-server
vyos@vyos:~$ sudo cat /etc/resolv.conf 
### Autogenerated by VyOS ###
### Do not edit, your changes will get overwritten ###

Details

Difficulty level
Easy (less than an hour)
Version
1.4-rolling-202110240217
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Related Objects

StatusSubtypeAssignedTask
In progressFEATURE REQUESTNone
ResolvedFEATURE REQUESTerkin
ResolvedBUGerkin

Event Timeline

Unknown Object (User) created this task.Oct 28 2021, 11:06 AM
erkin changed the task status from Open to In progress.Nov 3 2021, 6:42 PM

Less scary error messages are produced now.

erkin reopened this task as In progress.Jan 11 2022, 8:58 AM

Chained exceptions are covered too (and backported to Equuleus).