You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/03/02 21:56:23 UTC
ambari git commit: AMBARI-20280. Pre-Upgrade check message for
disabling Auto Start is difficult to understand and take action on (ncole)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 9ce7d709e -> c4f071be2
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/c4f071be
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c4f071be
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c4f071be
Branch: refs/heads/branch-2.5
Commit: c4f071be2e75936fc059358afe418e1faa2fcf2a
Parents: 9ce7d70
Author: Nate Cole <nc...@hortonworks.com>
Authored: Thu Mar 2 16:03:26 2017 -0500
Committer: Nate Cole <nc...@hortonworks.com>
Committed: Thu Mar 2 16:03:26 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/c4f071be/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/c4f071be/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());
+
}
}