launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #14446
[Merge] lp:~allenap/maas/maas-import-pxe-files-api-warning into lp:maas
Gavin Panella has proposed merging lp:~allenap/maas/maas-import-pxe-files-api-warning into lp:maas.
Commit message:
Update warning about boot images to stop mentioning maas-import-pxe-files.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~allenap/maas/maas-import-pxe-files-api-warning/+merge/135482
--
https://code.launchpad.net/~allenap/maas/maas-import-pxe-files-api-warning/+merge/135482
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/maas/maas-import-pxe-files-api-warning into lp:maas.
=== modified file 'src/maasserver/api.py'
--- src/maasserver/api.py 2012-11-08 12:58:48 +0000
+++ src/maasserver/api.py 2012-11-21 17:58:31 +0000
@@ -89,6 +89,7 @@
from inspect import getdoc
import sys
from textwrap import dedent
+from xml.sax.saxutils import quoteattr
from celery.app import app_or_default
from django.conf import settings
@@ -1964,14 +1965,14 @@
id__in=nodegroup_ids_with_images).filter(
status=NODEGROUP_STATUS.ACCEPTED)
if nodegroups_missing_images.exists():
+ accepted_clusters_url = (
+ "%s#accepted-clusters" % absolute_reverse("settings"))
warning = dedent("""\
Some cluster controllers are missing boot images. Either the
- maas-import-pxe-files script has not run yet, or it failed.
-
- Try running it manually on the affected
- <a href="%s#accepted-clusters">cluster controllers.</a>
- If it succeeds, this message will go away within 5 minutes.
- """ % absolute_reverse("settings"))
+ import task has not been initiated (for each cluster, the task
+ must be <a href=%s>initiated by hand</a> the first time), or
+ the import task failed.
+ """ % quoteattr(accepted_clusters_url))
register_persistent_error(COMPONENT.IMPORT_PXE_FILES, warning)
else:
discard_persistent_error(COMPONENT.IMPORT_PXE_FILES)