ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [05/28] ambari git commit: AMBARI-20280. Pre-Upgrade check message for disabling Auto Start is difficult to understand and take action on (ncole)
Date Fri, 03 Mar 2017 18:03:52 GMT
AMBARI-20280. Pre-Upgrade check message for disabling Auto Start is difficult to understand
and take action on (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/74d33276
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/74d33276
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/74d33276

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 74d33276c9e1672b70edd2ba18bfaa668ba2c88d
Parents: fc8128b
Author: Nate Cole <ncole@hortonworks.com>
Authored: Thu Mar 2 15:52:32 2017 -0500
Committer: Nate Cole <ncole@hortonworks.com>
Committed: Thu Mar 2 16:56:36 2017 -0500

----------------------------------------------------------------------
 .../org/apache/ambari/server/checks/CheckDescription.java     | 3 ++-
 .../ambari/server/checks/AutoStartDisabledCheckTest.java      | 7 +++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/74d33276/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
index 2d1468f..71c5857 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
@@ -318,7 +318,8 @@ public class CheckDescription {
     "Auto-Start Disabled Check",
     new ImmutableMap.Builder<String, String>()
       .put(AbstractCheckDescriptor.DEFAULT,
-        "Auto-Start must be disabled before performing an Upgrade").build());
+        "Auto Start must be disabled before performing an Upgrade. To disable Auto Start,
navigate to " +
+          "Admin > Service Auto Start. Turn the toggle switch off to Disabled and hit
Save.").build());
 
   public static CheckDescription RANGER_SSL_CONFIG_CHECK = new CheckDescription("RANGER_SSL_CONFIG_CHECK",
     PrereqCheckType.SERVICE,

http://git-wip-us.apache.org/repos/asf/ambari/blob/74d33276/ambari-server/src/test/java/org/apache/ambari/server/checks/AutoStartDisabledCheckTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/checks/AutoStartDisabledCheckTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/checks/AutoStartDisabledCheckTest.java
index c1e2ce7..671648a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/checks/AutoStartDisabledCheckTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/checks/AutoStartDisabledCheckTest.java
@@ -31,6 +31,7 @@ import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.DesiredConfig;
 import org.apache.ambari.server.state.stack.PrereqCheckStatus;
 import org.apache.ambari.server.state.stack.PrerequisiteCheck;
+import org.apache.commons.lang.StringUtils;
 import org.easymock.EasyMock;
 import org.junit.Assert;
 import org.junit.Before;
@@ -87,6 +88,7 @@ public class AutoStartDisabledCheckTest {
     m_check.perform(check, request);
 
     Assert.assertEquals(PrereqCheckStatus.PASS, check.getStatus());
+    Assert.assertTrue(StringUtils.isBlank(check.getFailReason()));
   }
 
   @Test
@@ -101,6 +103,7 @@ public class AutoStartDisabledCheckTest {
     m_check.perform(check, request);
 
     Assert.assertEquals(PrereqCheckStatus.PASS, check.getStatus());
+    Assert.assertTrue(StringUtils.isBlank(check.getFailReason()));
   }
 
   @Test
@@ -116,6 +119,10 @@ public class AutoStartDisabledCheckTest {
     m_check.perform(check, request);
 
     Assert.assertEquals(PrereqCheckStatus.FAIL, check.getStatus());
+    Assert.assertTrue(StringUtils.isNotBlank(check.getFailReason()));
+    Assert.assertEquals("Auto Start must be disabled before performing an Upgrade. To disable
Auto Start, navigate to " +
+          "Admin > Service Auto Start. Turn the toggle switch off to Disabled and hit
Save.", check.getFailReason());
+
   }
 
 }


Mime
View raw message