[2.1b1] Can't use custom image repository

Bug #1630679 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Lee Trager

Bug Description

ct 5 13:12:37 unleashed maas.import-images: [INFO] Downloading image descriptions from /var/www/html/images/streams/v1/
Oct 5 13:12:37 unleashed maas.import-images: [WARNING] I/O error while syncing boot images. If this problem persists, verify network connectivity and disk usage.

==> /var/log/maas/regiond.log <==
2016-10-05 13:12:37 [-] Error on request (51) bootresource.fetch: Mirror provides no Ubuntu images.
        Traceback (most recent call last):
          File "/usr/lib/python3.5/threading.py", line 862, in run
            self._target(*self._args, **self._kwargs)
          File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 801, in worker
            return target()
          File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
            task()
          File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
            task()
        --- <exception caught here> ---
          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 834, in callInContext
            return func(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 603, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 422, in retrier
            return func(*args, **kwargs)
          File "/usr/lib/python3.5/contextlib.py", line 30, in inner
            return func(*args, **kwds)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/bootresource.py", line 701, in fetch
            raise HandlerError(err_msg)
        maasserver.websockets.base.HandlerError: Mirror provides no Ubuntu images.

Related branches

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Isn't a protocol required? /var/www/html/images/streams/v1/ is just a path

summary: - [2.1] Can't use custom image repository
+ [2.1b1] Can't use custom image repository
Revision history for this message
Blake Rouse (blake-rouse) wrote :

I assume that your custom image repository is not signed? If its not signed then you must provide the full path to the index.json. It must be "index.json" not "index.sjson" as that is the signed version. If it is signed you must provide the GPG key for it to be able to get the images from the stream.

Changed in maas:
importance: Undecided → Critical
status: New → Triaged
milestone: none → 2.1.0
Revision history for this message
Lee Trager (ltrager) wrote :

Andres, could you please comment on whether or not this is a custom signed repo?

I created a mirror of https://images.maas.io/ephemeral-v3/daily and was able to set it to my boot-source using the UI.

Revision history for this message
Blake Rouse (blake-rouse) wrote :

My mirror works as well through the UI.

Changed in maas:
status: Triaged → Incomplete
Changed in maas:
milestone: 2.1.0 → 2.1.1
Revision history for this message
Lee Trager (ltrager) wrote :

I looked into this again today and I think both Blake and I are wrong. What appears to be happening when you set the URL in the UI is the validation fails so the URL isn't changed. The error isn't surfaced and nothing changes the URL in the UI. As such it appears MAAS is working with a local path when its really using the old URL.

That being said I'm curious if using a local path ever did work. The BootSource model was introduced in MAAS 1.6, since then it has always used a URLField. The URLField is a django provided field which only allows URLs. As such it seems users were never able to set the URL to a filepath unless Django changed the validator.

So should we allow users to set the BootSource to a local file path? Does that make sense when MAAS is in HA mode?

Lee Trager (ltrager)
Changed in maas:
status: Incomplete → Confirmed
Changed in maas:
status: Confirmed → Fix Committed
Changed in maas:
assignee: nobody → Lee Trager (ltrager)
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.