-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AMBARI-23057] Upgrade fails because of Stale alert definitions (apappu) #2885
Conversation
Refer to this link for build results (access rights to CI server needed): |
@swagle Could you please review this code change? |
ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
Outdated
Show resolved
Hide resolved
ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
Outdated
Show resolved
Hide resolved
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Changes look good @apappu, can you please add a unit test? Sorry missed this earlier. |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
looks like these errors are not related to my changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 LGTM
What changes were proposed in this pull request?
Have added DB consistency check to remove those stale alert definitions before even Upgrade started.
(Please fill in changes proposed in this fix)
(Please fill in changes proposed in this fix)
How was this patch tested?
Have tested in live ambari server with stale alert and without stale and it works fine. pls check the log below.
2019-03-22 22:17:50,835 INFO - Checking to ensure there is no stale alert definitions
2019-03-22 22:17:50,837 WARN - You have Alerts that are not mapped with any services : yarn_nodemanager_webui_percent(YARN1)
(Please explain how this patch was tested. Ex: unit tests, manual tests)
(If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)
2. Running autofix has removed those stale alerts and references. here is the sample log.
2019-03-27 18:50:27,842 INFO - fixAlertsForDeletedServices stale alert definitions for deleted services
2019-03-27 18:50:27,967 WARN - fixAlertsForDeletedServices - 2 alerts were deleted
Please review Ambari Contributing Guide before opening a pull request.