exceptions.KeyError: u'subarches' when syncing uploaded image from region to cluster

Bug #1363474 reported by Jason Hobbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Jason Hobbs

Bug Description

This is at version 1.7.0~beta2+bzr2847-0ubuntu1~ppa1.

After uploading a CentOS image via the API, I get an error in pserv.log:

2014-08-30 18:16:06+0000 [-] Unhandled error in Deferred:
2014-08-30 18:16:06+0000 [-] Unhandled Error
        Traceback (most recent call last):
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 423, in errback
            self._startRunCallbacks(fail)
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks
            self._runCallbacks()
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1155, in gotResult
            _inlineCallbacks(r, g, deferred)
        --- <exception caught here> ---
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks
            result = result.throwExceptionIntoGenerator(g)
          File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
            return g.throw(self.type, self.value, self.tb)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/rpc/boot_images.py", line 53, in import_boot_images
            yield deferToThread(_run_import, sources)
          File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 191, in _worker
            result = context.call(ctx, function, *args, **kwargs)
          File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
            return func(*args,**kw)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/utils/twisted.py", line 143, in wrapper
            return func(*args, **kwargs)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/rpc/boot_images.py", line 47, in _run_import
            boot_resources.import_images(sources)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/boot_resources.py", line 234, in import_images
            image_descriptions = download_all_image_descriptions(sources)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/download_descriptions.py", line 196, in download_all_image_descriptions
            source['url'], keyring=source.get('keyring', None))
          File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/download_descriptions.py", line 182, in download_image_descriptions
            dumper.sync(reader, rpath)
          File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 88, in sync
            return self.sync_index(reader, path, data, content)
          File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 240, in sync_index
            self.sync(reader, path=epath)
          File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 86, in sync
            return self.sync_products(reader, path, data, content)
          File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 318, in sync_products
            self.insert_item(item, src, target, pgree, ipath_cs)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/download_descriptions.py", line 82, in insert_item
            arch, subarches = item['arch'], item['subarches']
        exceptions.KeyError: u'subarches'

My download.json @ http://paste.ubuntu.com/8189810/ shows no subarches field for the centos product.

Related branches

Changed in maas:
importance: Undecided → Critical
summary: - exceptions.KeyError: u'subarches' when syncing uploaded image
+ exceptions.KeyError: u'subarches' when syncing uploading image from
+ region to cluster
summary: - exceptions.KeyError: u'subarches' when syncing uploading image from
+ exceptions.KeyError: u'subarches' when syncing uploaded image from
region to cluster
Changed in maas:
status: New → Fix Committed
Changed in maas:
milestone: none → 1.7.0
Changed in maas:
assignee: nobody → Jason Hobbs (jason-hobbs)
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.