Boot-resources start-import should re-start importing when changing boot-source configuration

In FCE deployment, when changing the bootsources from the default “http://images.maas.io/ephemeral-v3/daily”, it might still trying to fetch the bootsources from that url. And running that in an airgapped environment can have even worse consequences.

It should cancel import when changing (maas boot-resources stop-import), when changing the boot sources (eg. with maas boot-source update 1 url=“http://offline.repo/maas/” and re-initiate it with the updated config.

This is a repost of LP#1878895

log:

2020-04-30T17:31:34.983356+00:00 node001 maas.service_monitor: [info] Service 'maas-proxy' is not on, it will be started.

2020-04-30T17:31:47.389664+00:00 node001 maas.import-images: [warn] I/O error while syncing boot images. If this problem persists, verify network connectivity and disk usage.

2020-04-30T17:31:47.389802+00:00 node001 maas.bootsources: [error] Failed to import images from http://images.maas.io/ephemeral-v3/daily/: HTTPConnectionPool(host='images.maas.io', port=80): Max retries exceeded with url: /ephemeral-v3/daily/streams/v1/index.sjson (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f11b525cda0>: Failed to establish a new connection: [Errno 101] Network is unreachable',))

2020-04-30T17:31:47.417899+00:00 node001 maas.bootsources: [error] Unable to update boot sources cache.

2020-04-30T17:31:47.473282+00:00 node001 maas.bootresources: [info] Started importing of boot images from 1 source(s).

2020-04-30T17:31:47.475241+00:00 node001 maas.import-images: [info] Downloading image descriptions from http://images.maas.io/ephemeral-v3/daily/

2020-04-30T17:31:47.475770+00:00 node001 maas.import-images: [info] Region downloading image descriptions from 'http://images.maas.io/ephemeral-v3/daily/'.

2020-04-30T17:31:52.334256+00:00 node001 maas.service_monitor: [error] Service 'proxy' failed to start: Job for maas-proxy.service failed because a timeout was exceeded.#012See "systemctl status maas-proxy.service" and "journalctl -xe" for details.

2020-04-30T17:31:52.512391+00:00 node001 maas.service_monitor: [info] Service 'maas-proxy' is not on, it will be started.

2020-04-30T18:07:49+00:00 node003 maas.tftp: [warn] No boot images have been imported from the region.

2020-04-30T18:07:43+00:00 node002 maas.service_monitor: message repeated 3 times: [ [info] Service 'maas-proxy' is not on, it will be started.]

2020-04-30T18:07:50+00:00 node002 maas.import-images: [info] Starting rack boot image import

2020-04-30T18:07:50+00:00 node002 maas.import-images: [info] Downloading image descriptions from http://MAASVIP:80/MAAS/images-stream/streams/v1/index.json

2020-04-30T18:07:50+00:00 node002 maas.import-images: [info] Rack downloading image descriptions from 'http://MAASVIP:80/MAAS/images-stream/streams/v1/index.json'.

2020-04-30T18:07:50+00:00 node002 maas.import-images: [warn] Finished importing boot images, the region does not have any boot images available.

2020-04-30T18:07:50+00:00 node002 maas.tftp: [warn] No boot images have been imported from the region.

2020-04-30T18:08:01+00:00 node002 maas.service_monitor: [error] Service 'proxy' failed to start: Job for maas-proxy.service failed because a timeout was exceeded.#012See "systemctl status maas-proxy.service" and "journalctl -xe" for details.

2020-04-30T18:07:45.506418+00:00 node001 maas.service_monitor: message repeated 3 times: [ [info] Service 'maas-proxy' is not on, it will be started.]

2020-04-30T18:08:03.834297+00:00 node001 maas.service_monitor: [error] Service 'proxy' failed to start: Job for maas-proxy.service failed because a timeout was exceeded.#012See "systemctl status maas-proxy.service" and "journalctl -xe" for details.

2020-04-30T18:08:04+00:00 node003 maas.service_monitor: [error] Service 'proxy' failed to start: Job for maas-proxy.service failed because a timeout was exceeded.#012See "systemctl status maas-proxy.service" and "journalctl -xe" for details.

2020-04-30T18:08:04.973473+00:00 node001 maas.service_monitor: [info] Service 'maas-proxy' is not on, it will be started.

2020-04-30T18:08:07+00:00 node002 maas.import-images: [info] Downloading image descriptions from https://repo/user/current/maas-images/

2020-04-30T18:08:07+00:00 node002 maas.import-images: [info] Region downloading image descriptions from 'https://repo/user/current/maas-images/'.

2020-04-30T18:08:08+00:00 node002 maas.bootsources: [info] Updated boot sources cache.

2020-04-30T18:08:08+00:00 node002 maas.bootresources: [info] Started importing of boot images from 1 source(s).

2020-04-30T18:08:08+00:00 node002 maas.import-images: [info] Downloading image descriptions from https://repo/user/current/maas-images/

2020-04-30T18:08:08+00:00 node002 maas.import-images: [info] Region downloading image descriptions from 'https://repo/user/current/maas-images/'.

2020-04-30T18:08:09+00:00 node002 maas.bootresources: [info] Importing images from source: https://repo/user/current/maas-images/

2020-04-30T18:08:09+00:00 node002 maas.bootresources: [warn] Ignoring unsupported filetype(manifest) from com.ubuntu.maas.daily:v3:boot:18.04:amd64:ga-18.04 20200416

2020-04-30T18:08:09+00:00 node002 maas.bootresources: [warn] Ignoring unsupported filetype(manifest) from com.ubuntu.maas.daily:v3:boot:18.04:amd64:ga-18.04-lowlatency 20200416

2020-04-30T18:08:09+00:00 node002 maas.bootresources: [warn] Ignoring unsupported filetype(manifest) from com.ubuntu.maas.daily:v3:boot:18.04:amd64:hwe-18.04 20200416

2020-04-30T18:08:09+00:00 node002 maas.bootresources: [warn] Ignoring unsupported filetype(manifest) from com.ubuntu.maas.daily:v3:boot:18.04:amd64:hwe-18.04-edge 20200416

2020-04-30T18:08:09+00:00 node002 maas.bootresources: [warn] Ignoring unsupported filetype(manifest) from com.ubuntu.maas.daily:v3:boot:18.04:amd64:hwe-18.04-lowlatency 20200416

2020-04-30T18:08:10+00:00 node002 maas.bootresources: [warn] Ignoring unsupported filetype(manifest) from com.ubuntu.maas.daily:v3:boot:18.04:amd64:hwe-18.04-lowlatency-edge 20200416

such as? I mean I expect it to fail, but what are the ‘even worse’ consequences that you allude to?

if you have firewall dropping the requests, it will just stay stuck there trying to fetch the image, but no response will come. Basically the connection is open, pending forever.
I didn’t mean even worse as the universe will suffer.

1 Like