AMBARI-15215: Update warning messages for HAWQ and PXF in stack advisor (mithmatt)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8615cac3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8615cac3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8615cac3 Branch: refs/heads/AMBARI-13364 Commit: 8615cac3a9cee7edfee18e0c8c6fd0da021f8d2e Parents: 86d3780 Author: Matt <mmat...@pivotal.io> Authored: Tue Mar 8 11:06:34 2016 -0800 Committer: Matt <mmat...@pivotal.io> Committed: Tue Mar 8 11:06:34 2016 -0800 ---------------------------------------------------------------------- .../stacks/HDP/2.3/services/stack_advisor.py | 18 +++++------ .../stacks/2.3/common/test_stack_advisor.py | 34 ++++++++++++++++---- 2 files changed, 37 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/8615cac3/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index 53b46be..8e1aff2 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -83,15 +83,15 @@ class HDP23StackAdvisor(HDP22StackAdvisor): childItems.append( { "type": 'host-component', "level": 'ERROR', "message": message, "component-name": 'HAWQSTANDBY', "host": hawqStandbyHosts[0] } ) if len(hawqMasterHosts) == 1 and hostsCount > 1 and self.isLocalHost(hawqMasterHosts[0]): - message = "HAWQ Master and Ambari Server should not be deployed on the same host. " \ - "If you leave them colocated, make sure to set HAWQ Master Port property " \ - "to a value different from the port number used by Ambari Server database." + message = "The default Postgres port (5432) on the Ambari Server conflicts with the default HAWQ Masters port. " \ + "If you are using port 5432 for Postgres, you must either deploy the HAWQ Master on a different host " \ + "or configure a different port for the HAWQ Masters in the HAWQ Configuration page." childItems.append( { "type": 'host-component', "level": 'WARN', "message": message, "component-name": 'HAWQMASTER', "host": hawqMasterHosts[0] } ) if len(hawqStandbyHosts) == 1 and hostsCount > 1 and self.isLocalHost(hawqStandbyHosts[0]): - message = "HAWQ Standby Master and Ambari Server should not be deployed on the same host. " \ - "If you leave them colocated, make sure to set HAWQ Master Port property " \ - "to a value different from the port number used by Ambari Server database." + message = "The default Postgres port (5432) on the Ambari Server conflicts with the default HAWQ Masters port. " \ + "If you are using port 5432 for Postgres, you must either deploy the HAWQ Standby Master on a different host " \ + "or configure a different port for the HAWQ Masters in the HAWQ Configuration page." childItems.append( { "type": 'host-component', "level": 'WARN', "message": message, "component-name": 'HAWQSTANDBY', "host": hawqStandbyHosts[0] } ) if "PXF" in servicesList: @@ -934,9 +934,9 @@ class HDP23StackAdvisor(HDP22StackAdvisor): prop_name = 'hawq_master_address_port' validationItems.append({"config-name": prop_name, "item": self.getWarnItem( - "The default Postgres port (5432) on the Ambari Server conflicts with the default HAWQ Master port. " - "If you are using port 5432 for Postgres, you must either deploy the HAWQ Master on a different host " - "or configure a different port for the HAWQ Master in the HAWQ Configuration page.")}) + "The default Postgres port (5432) on the Ambari Server conflicts with the default HAWQ Masters port. " + "If you are using port 5432 for Postgres, you must either deploy the HAWQ Masters on a different host " + "or configure a different port for the HAWQ Masters in the HAWQ Configuration page.")}) # 2. Check if any data directories are pointing to root dir '/' directories = { http://git-wip-us.apache.org/repos/asf/ambari/blob/8615cac3/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py index cf1f606..1a3fa65 100644 --- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py @@ -451,7 +451,13 @@ class TestHDP23StackAdvisor(TestCase): validations = self.stackAdvisor.getComponentLayoutValidations(services, hosts) self.assertEquals(len(validations), 1) - expected={'component-name': 'HAWQSTANDBY', 'message': 'HAWQ Master and HAWQ Standby Master cannot be deployed on the same host.', 'type': 'host-component', 'host': 'c6403.ambari.apache.org', 'level': 'ERROR'} + expected = { + 'component-name': 'HAWQSTANDBY', + 'message': 'HAWQ Master and HAWQ Standby Master cannot be deployed on the same host.', + 'type': 'host-component', + 'host': 'c6403.ambari.apache.org', + 'level': 'ERROR' + } self.assertEquals(validations[0], expected) # case-3: HAWQ Master and Ambari Server are collocated @@ -467,7 +473,15 @@ class TestHDP23StackAdvisor(TestCase): validations = self.stackAdvisor.getComponentLayoutValidations(services, hosts) self.assertEquals(len(validations), 1) - expected={'component-name': 'HAWQMASTER', 'message': 'HAWQ Master and Ambari Server should not be deployed on the same host. If you leave them colocated, make sure to set HAWQ Master Port property to a value different from the port number used by Ambari Server database.', 'type': 'host-component', 'host': 'c6401.ambari.apache.org', 'level': 'WARN'} + expected = { + 'component-name': 'HAWQMASTER', + 'message': 'The default Postgres port (5432) on the Ambari Server conflicts with the default HAWQ Masters port. ' + + 'If you are using port 5432 for Postgres, you must either deploy the HAWQ Master on a different host ' + + 'or configure a different port for the HAWQ Masters in the HAWQ Configuration page.', + 'type': 'host-component', + 'host': 'c6401.ambari.apache.org', + 'level': 'WARN' + } self.assertEquals(validations[0], expected) # case-4: HAWQ Standby and Ambari Server are collocated @@ -483,7 +497,15 @@ class TestHDP23StackAdvisor(TestCase): validations = self.stackAdvisor.getComponentLayoutValidations(services, hosts) self.assertEquals(len(validations), 1) - expected={'component-name': 'HAWQSTANDBY', 'message': 'HAWQ Standby Master and Ambari Server should not be deployed on the same host. If you leave them colocated, make sure to set HAWQ Master Port property to a value different from the port number used by Ambari Server database.', 'type': 'host-component', 'host': 'c6401.ambari.apache.org', 'level': 'WARN'} + expected = { + 'component-name': 'HAWQSTANDBY', + 'message': 'The default Postgres port (5432) on the Ambari Server conflicts with the default HAWQ Masters port. ' + + 'If you are using port 5432 for Postgres, you must either deploy the HAWQ Standby Master on a different host ' + + 'or configure a different port for the HAWQ Masters in the HAWQ Configuration page.', + 'type': 'host-component', + 'host': 'c6401.ambari.apache.org', + 'level': 'WARN' + } self.assertEquals(validations[0], expected) @@ -1855,9 +1877,9 @@ class TestHDP23StackAdvisor(TestCase): "config-name": "hawq_master_address_port", "config-type": "hawq-site", "level": "WARN", - "message": "The default Postgres port (5432) on the Ambari Server conflicts with the default HAWQ Master port. " - "If you are using port 5432 for Postgres, you must either deploy the HAWQ Master on a different host " - "or configure a different port for the HAWQ Master in the HAWQ Configuration page.", + "message": "The default Postgres port (5432) on the Ambari Server conflicts with the default HAWQ Masters port. " + "If you are using port 5432 for Postgres, you must either deploy the HAWQ Masters on a different host " + "or configure a different port for the HAWQ Masters in the HAWQ Configuration page.", "type": "configuration"} self.assertEqual(problems[0], expected)