Comment 1 for bug 1571007

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [2.0 beta 2] MAAS Rack Controller doesn't log when it is importing images

Also, the rack controller is not importing pxelinux0 and other files, because it doesn't have network access, however, it should have logged that it was able to download the image sfrom the maas server.

Also, when not having access to the network, the log should explain more why or what it was nuable to download instead of:

2016-04-16 01:55:12+0000 [ClusterClient,client] Rack controller '4y3h7q' registered (via maas00:pid=3977).
2016-04-16 02:06:42+0000 [-] Downloading images failed.
        Traceback (most recent call last):
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 434, in errback
            self._startRunCallbacks(fail)
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 501, in _startRunCallbacks
            self._runCallbacks()
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 588, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1184, in gotResult
            _inlineCallbacks(r, g, deferred)
        --- <exception caught here> ---
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
            result = result.throwExceptionIntoGenerator(g)
          File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
            return g.throw(self.type, self.value, self.tb)
          File "/usr/lib/python3/dist-packages/provisioningserver/pserv_services/image_download_service.py", line 121, in maybe_start_download
            yield self._start_download()
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
            result = result.throwExceptionIntoGenerator(g)
          File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
            return g.throw(self.type, self.value, self.tb)
          File "/usr/lib/python3/dist-packages/provisioningserver/pserv_services/image_download_service.py", line 112, in _start_download
            get_proxy_url("https"))
          File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 246, in inContext
            result = inContext.theWork()
          File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
            inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
            return func(*args,**kw)
          File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 201, in wrapper
            return func(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/provisioningserver/rpc/boot_images.py", line 106, in _run_import
            boot_resources.import_images(sources)
          File "/usr/lib/python3/dist-packages/provisioningserver/import_images/boot_resources.py", line 276, in import_images
            install_boot_loaders(snapshot_path, image_descriptions.get_image_arches())
          File "/usr/lib/python3/dist-packages/provisioningserver/import_images/boot_resources.py", line 98, in install_boot_loaders
            boot_method.install_bootloader(destination)
          File "/usr/lib/python3/dist-packages/provisioningserver/boot/uefi.py", line 128, in install_bootloader
            'main', 'amd64')
          File "/usr/lib/python3/dist-packages/provisioningserver/boot/utils.py", line 164, in get_updates_package
            package, archive, component, architecture, release=release)
          File "/usr/lib/python3/dist-packages/provisioningserver/boot/utils.py", line 137, in get_package
            package, archive, component, architecture, release=release)
          File "/usr/lib/python3/dist-packages/provisioningserver/boot/utils.py", line 112, in get_package_info
            packages = get_packages(archive, component, architecture, release=release)
          File "/usr/lib/python3/dist-packages/provisioningserver/boot/utils.py", line 91, in get_packages
            release_file = get_file(release_url)
          File "/usr/lib/python3/dist-packages/provisioningserver/boot/utils.py", line 49, in get_file
            response = urllib.request.build_opener().open(url)
          File "/usr/lib/python3.5/urllib/request.py", line 465, in open
            response = self._open(req, data)
          File "/usr/lib/python3.5/urllib/request.py", line 483, in _open
            '_open', req)
          File "/usr/lib/python3.5/urllib/request.py", line 443, in _call_chain
            result = func(*args)
          File "/usr/lib/python3.5/urllib/request.py", line 1271, in http_open
            return self.do_open(http.client.HTTPConnection, req)
          File "/usr/lib/python3.5/urllib/request.py", line 1245, in do_open
            raise URLError(err)
        urllib.error.URLError: <urlopen error [Errno 101] Network is unreachable>