Unable to import new Images, Controller will not sync

Hello All,

I am trying to import Ubuntu 22.04 into MaaS through the Web UI and and when I select 22.04 amd64 and click Update Selection, It is able to download the image and then it gets stuck on “Waiting for rack controller(s) to sync” where it gets stuck in perpetuity. In looking at the logs, I do see this message pop up in the rackd.log right at the time the download completes and it moves on to the next step.

2022-10-14 18:57:50 twisted.internet.defer: [critical] Unhandled error in Deferred:
2022-10-14 18:57:50 twisted.internet.defer: [critical] 
	Traceback (most recent call last):
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 501, in errback
	    self._startRunCallbacks(fail)
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks
	    self._runCallbacks()
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1475, in gotResult
	    _inlineCallbacks(r, g, status)
	--- <exception caught here> ---
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
	    result = result.throwExceptionIntoGenerator(g)
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
	    return g.throw(self.type, self.value, self.tb)
	  File "/snap/maas/23947/lib/python3.8/site-packages/provisioningserver/rpc/boot_images.py", line 153, in _import_boot_images
	    yield deferToThread(_run_import, sources, maas_url, **proxies)
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
	    result = inContext.theWork()
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
	    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
	    return self.currentContext().callWithContext(ctx, func, *args, **kw)
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
	    return func(*args,**kw)
	  File "/snap/maas/23947/lib/python3.8/site-packages/provisioningserver/utils/twisted.py", line 202, in wrapper
	    result = func(*args, **kwargs)
	  File "/snap/maas/23947/lib/python3.8/site-packages/provisioningserver/rpc/boot_images.py", line 117, in _run_import
	    imported = boot_resources.import_images(sources)
	  File "/snap/maas/23947/lib/python3.8/site-packages/provisioningserver/import_images/boot_resources.py", line 166, in import_images
	    image_descriptions = download_all_image_descriptions(
	  File "/snap/maas/23947/lib/python3.8/site-packages/provisioningserver/import_images/download_descriptions.py", line 343, in download_all_image_descriptions
	    repo_boot = download_image_descriptions(
	  File "/snap/maas/23947/lib/python3.8/site-packages/provisioningserver/import_images/download_descriptions.py", line 333, in download_image_descriptions
	    dumper.sync(reader, rpath)
	  File "/snap/maas/23947/lib/python3.8/site-packages/provisioningserver/import_images/download_descriptions.py", line 201, in sync
	    super().sync(reader, path)
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 86, in sync
	    data = util.load_content(payload)
	  File "/snap/maas/23947/usr/lib/python3/dist-packages/simplestreams/util.py", line 332, in load_content
	    return json.loads(content)
	  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
	    return _default_decoder.decode(s)
	  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
	    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
	  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
	    raise JSONDecodeError("Expecting value", s, err.value) from None
	json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I am running version 3.2.6

I have not noticed any other issues other than this.

I appreciate and help or guidance anyone could give me with this. I am not exactly a maas expert, I just know enough to break things.

Thank you,

Salvatore

@sguercio, i’m able to download 22.04 and have it sync with no log errors. you may have found a bug! would you please report one?