[2.4] Bad traceback when an image is not in the image mirror

Bug #1777719 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Medium
Unassigned

Bug Description

I create a simeplestreams image mirror, but I only imported the xenial and bionic images. However, the index files of the mirror described not only the xenial/bionic images, but also, all other releases that were not imported.

Since MAAS gave me the option to select releases not in the mirror, I tried to import and:

1. MAAS didn't surface a UI error saying that the image was not available in the mirror: https://launchpadlibrarian.net/375181270/trusty-not-available.png

2. MAAS showed a nasty traceback while trying to download the image that wasn't available instead of catching the error aand showing a nice message:

2018-06-19 19:42:00 stderr: [error] Exception in thread Thread-30:
2018-06-19 19:42:00 stderr: [error] Traceback (most recent call last):
2018-06-19 19:42:00 stderr: [error] File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
2018-06-19 19:42:00 stderr: [error] self.run()
2018-06-19 19:42:00 stderr: [error] File "/usr/lib/python3.6/threading.py", line 864, in run
2018-06-19 19:42:00 stderr: [error] self._target(*self._args, **self._kwargs)
2018-06-19 19:42:00 stderr: [error] File "/usr/lib/python3/dist-packages/maasserver/bootresources.py", line 785, in write_content_thread
2018-06-19 19:42:00 stderr: [error] if write_chunk():
2018-06-19 19:42:00 stderr: [error] File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 756, in call_within_transaction
2018-06-19 19:42:00 stderr: [error] return func_outside_txn(*args, **kwargs)
2018-06-19 19:42:00 stderr: [error] File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 563, in retrier
2018-06-19 19:42:00 stderr: [error] return func(*args, **kwargs)
2018-06-19 19:42:00 stderr: [error] File "/usr/lib/python3.6/contextlib.py", line 52, in inner
2018-06-19 19:42:00 stderr: [error] return func(*args, **kwds)
2018-06-19 19:42:00 stderr: [error] File "/usr/lib/python3/dist-packages/maasserver/bootresources.py", line 771, in write_chunk
2018-06-19 19:42:00 stderr: [error] buf = reader.read(self.read_size)
2018-06-19 19:42:00 stderr: [error] File "/usr/lib/python3/dist-packages/simplestreams/contentsource.py", line 275, in read
2018-06-19 19:42:00 stderr: [error] buf = self.cs.read(size)
2018-06-19 19:42:00 stderr: [error] File "/usr/lib/python3/dist-packages/simplestreams/contentsource.py", line 135, in read
2018-06-19 19:42:00 stderr: [error] self.open()
2018-06-19 19:42:00 stderr: [error] File "/usr/lib/python3/dist-packages/simplestreams/contentsource.py", line 131, in open
2018-06-19 19:42:00 stderr: [error] self.fd = self._open()
2018-06-19 19:42:00 stderr: [error] File "/usr/lib/python3/dist-packages/simplestreams/contentsource.py", line 127, in _open
2018-06-19 19:42:00 stderr: [error] raise myerr
2018-06-19 19:42:00 stderr: [error] OSError: Unable to open http://192.168.122.1/maas/images/ephemeral-v3/daily/trusty/amd64/20180502/hwe-x/generic/boot-initrd. mirrors=[]
2018-06-19 19:42:00 stderr: [error]

Revision history for this message
Andres Rodriguez (andreserl) wrote :
description: updated
tags: added: error-surface
Changed in maas:
milestone: none → 2.5.0
importance: Undecided → Medium
status: New → Triaged
Changed in maas:
milestone: 2.5.0 → 2.5.0rc1
Changed in maas:
milestone: 2.5.0rc1 → 2.5.0
Changed in maas:
milestone: 2.5.0 → 2.5.x
Revision history for this message
Adam Collard (adam-collard) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

MAAS Team

Changed in maas:
status: Triaged → Invalid
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.