MAAS won’t download images

Hi, we are setting up an initial test environment to try out MAAS and are having difficulties getting images to download.

We are running 2.9, but have also tried 2.7.
We are using a combined region+rack for this evaluation.
We are using the default Maas.IO source.
We are using the test postgres db as mentioned in the documentation.

We go to the images section tab and the LTS image is selected and shows “Queued for download”, but never starts downloading.
The MAAS server can download anything from APT without issue, and nothing is being blocked to the internet.

We have also tried forcing the download using the command line.

We have reloaded our build 3 times now thinking we messed up somewhere.

do you see any errors in /var/snap/maas/common/log/rackd.log or /var/snap/maas/common/log/maas.log?

I checked and found the following errors:

Maas.log
[warn] I/O error while syncing boot images. If this problem persists, verify network connectivity and disk usage.

deployserver maas.bootsources: [error] Failed to import images from http://images.maas.io/ephemeral-v3/stable/: HTTPConnectionPool(host=‘images.maas.io’, port=80): Max retries exceeded with url: /ephemeral-v3/stable/streams/v1/index.sjson (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f07806aed00>: Failed to establish a new connection: [Errno 101] Network is unreachable’))

Rackd.log
provisioningserver.rackdservices.tftp: [critical] TFTP back-end failed.
Traceback (most recent call last):
— —
File “/snap/maas/12555/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File “/snap/maas/12555/lib/python3.8/site-packages/provisioningserver/rackdservices/tftp.py”, line 321, in no_response_errback
failure.trap(BootConfigNoResponse)
File “/snap/maas/12555/usr/lib/python3/dist-packages/twisted/python/failure.py”, line 439, in trap
self.raiseException()
File “/snap/maas/12555/usr/lib/python3/dist-packages/twisted/python/failure.py”, line 467, in raiseException
raise self.value.with_traceback(self.tb)
File “/snap/maas/12555/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File “/snap/maas/12555/usr/lib/python3/dist-packages/twisted/protocols/amp.py”, line 1994, in _massageError
error.trap(RemoteAmpError)
File “/snap/maas/12555/usr/lib/python3/dist-packages/twisted/python/failure.py”, line 439, in trap
self.raiseException()
File “/snap/maas/12555/usr/lib/python3/dist-packages/twisted/python/failure.py”, line 467, in raiseException
raise self.value.with_traceback(self.tb)
twisted.protocols.amp.UnhandledCommand: (b’UNHANDLED’, ‘Unknown Error [deployserver:pid=1997:cmd=GetBootConfig:ask=28d3]’)

provisioningserver.rackdservices.http: [critical] Failed to handle boot HTTP request.
Traceback (most recent call last):
File “/snap/maas/12555/lib/python3.8/site-packages/provisioningserver/utils/twisted.py”, line 501, in fail
self.set(failure)
File “/snap/maas/12555/lib/python3.8/site-packages/provisioningserver/utils/twisted.py”, line 484, in set
waiter.callback(value)
File “/snap/maas/12555/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 460, in callback
self._startRunCallbacks(result)
File “/snap/maas/12555/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 568, in _startRunCallbacks
self._runCallbacks()
— —
File “/snap/maas/12555/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File “/snap/maas/12555/lib/python3.8/site-packages/provisioningserver/rackdservices/tftp.py”, line 357, in all_is_lost_errback
raise BackendError(failure.getErrorMessage())
tftp.errors.BackendError: (b’UNHANDLED’, ‘Unknown Error [deployserver:pid=1997:cmd=GetBootConfig:ask=28d3]’)

I’m also new to maas…

Does curl http://images.maas.io/ephemeral-v3/stable/streams/v1/index.sjson work from the server. I haven’t had any issues syncing the default images, its worth ruling out simple networking issues and check you do indeed have free disk space.

Thanks for the reply!
I verified we have over 100gb free and could access that url without issue, and we can.

Maybe not what you want but I’ve been playing around with maas using a vagrant setup. Perhaps give it a try at least the images download for me.

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

  config.vm.box = "debian/buster64"

  # Create a forwarded port mapping to allow you to connect to the MaaS UI
  config.vm.network "forwarded_port", guest: 5240, host: 5240

  # Create an additional private network to serve PXE requests using a specific IP. and intel NIC
  config.vm.network "private_network", ip: "192.168.50.10", nic_type: "82540EM"

  # Provider-specific configuration so you can fine-tune various
  # backing providers for Vagrant. These expose provider-specific options.
  # Example for VirtualBox:
  #
  config.vm.provider "virtualbox" do |vb|
    # Display the VirtualBox GUI when booting the machine
    vb.gui = false
    # set the 2nd interface to use promiscous mode     
    vb.customize [
      "modifyvm", :id,
      "--nicpromisc2", "allow-all"
    ]
    # Customize the amount of memory on the VM:
    vb.cpus ="4"
    vb.memory = "8096"
  end

  # Install MaaS on debian
  config.vm.provision "shell", inline: <<-SHELL
    apt-get update
    apt-get install -y snapd
    snap install core
    snap install --channel=2.9/stable maas
    snap install maas-test-db
  SHELL

  # Initiate MaaS and create default user
  config.vm.provision "shell", inline: <<-SHELL
    maas init region+rack --database-uri maas-test-db:/// --maas-url http://127.0.0.1:5240/MAAS
    maas createadmin --username admin --password admin --email admin@admin.com
    maas admin maas set-config name=upstream_dns value="8.8.8.8"
  SHELL

end

Make sure you have vagrant installed and just run vagrant up and you will be able to connect to the UI on http://localhost:5240/MAAS