Merge lp:~blake-rouse/maas/fix-1439359 into lp:~maas-committers/maas/trunk
Proposed by
Blake Rouse
Status: | Merged |
---|---|
Approved by: | Blake Rouse |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3787 |
Proposed branch: | lp:~blake-rouse/maas/fix-1439359 |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
197 lines (+126/-4) 2 files modified
src/maasserver/start_up.py (+67/-2) src/maasserver/tests/test_start_up.py (+59/-2) |
To merge this branch: | bzr merge lp:~blake-rouse/maas/fix-1439359 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andres Rodriguez (community) | Approve | ||
Review via email: mp+255206@code.launchpad.net |
Commit message
Set the correct boot source selections and start importing of boot resources if the cluster already has boot images.
To post a comment you must log in.
Should we consider that we need to import the same arches / releases as
those that have already been imported previously? I think we should.
On Apr 3, 2015 15:06, "Blake Rouse" <email address hidden> wrote:
> Blake Rouse has proposed merging lp:~blake-rouse/maas/fix-1439359 into /bugs.launchpad .net/maas/ +bug/1439359 /code.launchpad .net/~blake- rouse/maas/ fix-1439359/ +merge/ 255206 /bootresources. py' bootresources. py 2015-03-25 15:33:23 +0000 bootresources. py 2015-04-03 19:06:06 +0000 url_reverse( 'images' ) images_ locally) > 0: /tests/ test_bootresour ces.py' tests/test_ bootresources. py 2015-03-25 15:33:23 +0000 tests/test_ bootresources. py 2015-04-03 19:06:06 +0000 settings, 'DEFAULT_MAAS_URL', 'http:// %s' % bootresources, "list_boot_images") images. return_ value = [make_rpc_ boot_image( )] bootresources, "import_resources") ImportResources ProgressService () check_boot_ images( ) whitespace( error_expected % images_link), import_ if_boot_ images_ exists_ on_cluster_ not_region( self): make_string( ), make_string( )) settings, 'DEFAULT_MAAS_URL', 'http:// %s' % bootresources, "list_boot_images") images. return_ value = [make_rpc_ boot_image( )] bootresources, "import_resources") ImportResources ProgressService () check_boot_ images( ) (import_ resourc. ..
> lp:maas.
>
> Commit message:
> Automatically start importing of boot resources if the cluster already has
> boot images.
>
> Requested reviews:
> MAAS Maintainers (maas-maintainers)
> Related bugs:
> Bug #1439359 in MAAS: "When upgrading to MAAS 1.7 from MAAS 1.5, MAAS
> should trigger the image import automatically."
> https:/
>
> For more details, see:
> https:/
> --
> You are subscribed to branch lp:maas.
>
> === modified file 'src/maasserver
> --- src/maasserver/
> +++ src/maasserver/
> @@ -1027,6 +1027,13 @@
> images_link = absolute_
> boot_images_locally = list_boot_images()
> if len(boot_
> + # Start the import process for the user, since the cluster
> + # already has images. Even though the cluster is usable
> the
> + # region will not be usable until it has boot images as
> well.
> + import_resources()
> +
> + # Show the warning as well. This will do away once the
> images
> + # have been imported.
> warning = (
> "Your cluster currently has boot images, but your
> region "
> "does not. Nodes will not be able to provision until
> you "
>
> === modified file 'src/maasserver
> --- src/maasserver/
> +++ src/maasserver/
> @@ -1268,6 +1268,7 @@
> utils_module.
> abs_path)
> list_boot_images = self.patch(
> list_boot_
> + self.patch(
>
> service = bootresources.
> service.
> @@ -1284,6 +1285,18 @@
> normalise_
> error_observed)
>
> + def
> test__starts_
> + abs_path = "/%s/%s/" % (factory.
> factory.
> + self.patch(
> + utils_module.
> abs_path)
> + list_boot_images = self.patch(
> + list_boot_
> + import_resources = self.patch(
> +
> + service = bootresources.
> + service.
> + self.assertThat