← Back to team overview

sts-sponsors team mailing list archive

[Merge] ~emdw/maas:fix_1990416_invalid_command_maas_url into maas:master

 

Eline Maaike De Weerd has proposed merging ~emdw/maas:fix_1990416_invalid_command_maas_url into maas:master.

Commit message:
Update error msgs concerning setting of MAAS URL with correct command for snap



Requested reviews:
  MAAS Maintainers (maas-maintainers)
Related bugs:
  Bug #1990416 in MAAS: "MAAS reports invalid command to run when maas-url is incorrect"
  https://bugs.launchpad.net/maas/+bug/1990416

For more details, see:
https://code.launchpad.net/~emdw/maas/+git/maas/+merge/440715
-- 
Your team MAAS Maintainers is requested to review the proposed merge of ~emdw/maas:fix_1990416_invalid_command_maas_url into maas:master.
diff --git a/src/maasserver/dns/zonegenerator.py b/src/maasserver/dns/zonegenerator.py
index d6630ce..b6fd406 100644
--- a/src/maasserver/dns/zonegenerator.py
+++ b/src/maasserver/dns/zonegenerator.py
@@ -80,7 +80,8 @@ WARNING_MESSAGE = (
     "The DNS server will use the address '%s',  which is inside the "
     "loopback network.  This may not be a problem if you're not using "
     "MAAS's DNS features or if you don't rely on this information. "
-    "Consult the 'maas-region local_config_set --maas-url' command "
+    "Consult the command: 'maas-region local_config_set --maas-url'"
+    "(deb installs) or 'maas config --maas-url' (snap installs)"
     "for details on how to set the MAAS URL."
 )
 
@@ -95,8 +96,9 @@ def get_dns_server_address(rack_controller=None, ipv4=True, ipv6=True):
     """Return a single DNS server IP address (based on address family).
 
     That address is derived from the config maas_url or rack_controller.url.
-    Consult the 'maas-region local_config_set --maas-url' command for
-    details on how to set the MAAS URL.
+    Consult the command: 'maas-region local_config_set --maas-url' (deb
+    installs) or 'maas config --maas-url' (snap installs) for details on how
+    to set the MAAS URL.
 
     :param rack_controller: Optional rack controller to which the DNS server
         should be accessible.  If given, the server address will be taken from
@@ -124,8 +126,9 @@ def get_dns_server_addresses(
     """Return the DNS server's IP addresses.
 
     That address is derived from the config maas_url or rack_controller.url.
-    Consult the 'maas-region local_config_set --maas-url' command for
-    details on how to set the MAAS URL.
+    Consult the command: 'maas-region local_config_set --maas-url' (deb
+    installs) or 'maas config --maas-url' (snap installs) for details on how
+    to set the MAAS URL.
 
     :param rack_controller: Optional rack controller to which the DNS server
         should be accessible.  If given, the server addresses will be taken
@@ -155,8 +158,9 @@ def get_dns_server_addresses(
             "Unable to find MAAS server IP address: %s. MAAS's DNS server "
             "requires this IP address for the NS records in its zone files. "
             "Make sure that the configuration setting for the MAAS URL has "
-            "the correct hostname. Consult the 'maas-region "
-            "local_config_set --maas-url' command." % e.strerror
+            "the correct hostname. Consult the command 'maas-region "
+            "local_config_set --maas-url' (deb installs) or 'maas config "
+            "--maas-url' (snap installs) for more details." % e.strerror
         )
 
     if filter_allowed_dns:
diff --git a/src/maasserver/server_address.py b/src/maasserver/server_address.py
index 547d2d9..854580c 100644
--- a/src/maasserver/server_address.py
+++ b/src/maasserver/server_address.py
@@ -44,8 +44,9 @@ def get_maas_facing_server_addresses(
     """Return addresses for the MAAS server.
 
     The address is taken from the configured MAAS URL or `controller.url`.
-    Consult the 'maas-region local_config_set' command for details on
-    how to set the MAAS URL.
+    For details on how to set the MAAS URL, consult the command:
+    'maas-region local_config_set --default-url' for deb installs, or
+    'maas config --maas-url' for snap installs.
 
     If there is more than one IP address for the host, all of the addresses for
     the appropriate family will be returned.  (If link_local is False, then
diff --git a/src/maasserver/utils/__init__.py b/src/maasserver/utils/__init__.py
index e490eb0..910768e 100644
--- a/src/maasserver/utils/__init__.py
+++ b/src/maasserver/utils/__init__.py
@@ -41,8 +41,9 @@ def absolute_reverse(
     calls Django's 'reverse' method and prefixes the result of that call with
     the configured MAAS URL.
 
-    Consult the 'maas-region local_config_set --default-url' command for
-    details on how to set the MAAS URL.
+    For details on how to set the MAAS URL, consult the command:
+    'maas-region local_config_set --default-url' for deb installs, or
+    'maas config --maas-url' for snap installs.
 
     :param view_name: Django's view function name/reference or URL pattern
         name for which to compute the absolute URL.

Follow ups